aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catdap.yml4
-rw-r--r--lib/CatDap/Controller/register.pm4
2 files changed, 8 insertions, 0 deletions
diff --git a/catdap.yml b/catdap.yml
index 55288f6..e981676 100644
--- a/catdap.yml
+++ b/catdap.yml
@@ -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'