Skip to content

Commit

Permalink
Remove allowed characters before name before alphanumeric test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson committed Jun 3, 2014
1 parent 8f69f7d commit 1f81b3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions application/config/aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
// 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,

Expand Down
2 changes: 1 addition & 1 deletion application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public function create_user($email, $pass, $name='') {
$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;
}
Expand Down

0 comments on commit 1f81b3f

Please sign in to comment.