diff options
-rw-r--r-- | catdap.yml | 4 | ||||
-rw-r--r-- | lib/CatDap/Controller/register.pm | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -28,6 +28,10 @@ Model::User: host: ldap.mageia.org start_tls: 1 +register: + login_blacklist: + - apache + authentication: default_realm: ldap realms: 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' |