Skip to content

Commit

Permalink
Update Aauth.php
Browse files Browse the repository at this point in the history
When trying to login a user with a special password for example: Password@123, the script would return an error saying the password was wrong.

I removed "or !ctype_alnum($pass)" from the login section which allows users to login and register with html chars in their passwords.
  • Loading branch information
Andy Cresswell committed Jul 22, 2014
1 parent cf7b065 commit 05c660c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,16 @@ public function login($email, $pass, $remember = FALSE) {

$this->CI->input->set_cookie($cookie);

// verification
if( !valid_email($email) or !ctype_alnum($pass) or strlen($pass) < 5 or

/*
*
* User Verification
*
* Removed or !ctype_alnum($pass) from the IF statement
* It was causing issues with special characters in passwords
* and returning false even if the password matches.
*/
if( !valid_email($email) or strlen($pass) < 5 or
strlen($pass) > $this->config_vars['max'] )
{
$this->error($this->config_vars['wrong']);
Expand Down

0 comments on commit 05c660c

Please sign in to comment.