aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CatDap/Controller/register.pm
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-12-06 02:21:40 +0000
committerMichael Scherer <misc@mageia.org>2010-12-06 02:21:40 +0000
commit0181b5c63fbfd5d18acd6a9688edf850d8ff9742 (patch)
tree86d94412c4b44c46d30dfafe5add234b374612a8 /lib/CatDap/Controller/register.pm
parent0cb683bf2732d37d2c67a6f2e120e4fa08dbad9b (diff)
downloadidentity-0181b5c63fbfd5d18acd6a9688edf850d8ff9742.tar
identity-0181b5c63fbfd5d18acd6a9688edf850d8ff9742.tar.gz
identity-0181b5c63fbfd5d18acd6a9688edf850d8ff9742.tar.bz2
identity-0181b5c63fbfd5d18acd6a9688edf850d8ff9742.tar.xz
identity-0181b5c63fbfd5d18acd6a9688edf850d8ff9742.zip
add a configurable blacklist of login, to complete previous commit
Diffstat (limited to 'lib/CatDap/Controller/register.pm')
-rw-r--r--lib/CatDap/Controller/register.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CatDap/Controller/register.pm b/lib/CatDap/Controller/register.pm
index ed3075b..360d7b2 100644
--- a/lib/CatDap/Controller/register.pm
+++ b/lib/CatDap/Controller/register.pm
@@ -61,6 +61,10 @@ sub check : Local {
close($etcpasswd);
}
+ if ( grep /^$username$/, @{${$c->config}{'register'}{'login_blacklist'}}) {
+ push @errors, $c->loc('Username is not authorized to be used');
+ }
+
if ($c->request->params->{gn} !~ /^\p{IsAlnum}+$/) {
push @errors, $c->loc(
'The first name supplied contains illegal characters'