diff --git a/application/config/aauth.php b/application/config/aauth.php index 021fafc..c6cd990 100644 --- a/application/config/aauth.php +++ b/application/config/aauth.php @@ -43,6 +43,9 @@ $config['aauth'] = array( // pasword maximum char long (min is 4) 'max' => 13, + // non alphanumeric characters that are allowed in a name + 'valid_chars' => array(' ', '\''), + // it limits login attempts 'dos_protection' => true, diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 2d97d5a..4753e80 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -297,7 +297,7 @@ class Aauth { $this->error($this->config_vars['pass_invalid']); $valid = false; } - if ($name !='' and !ctype_alnum($name)){ + if ($name !='' and !ctype_alnum(str_replace($this->config_vars['valid_chars'], '', $name))){ $this->error($this->config_vars['name_invalid']); $valid = false; }