From 05c660cf93d5d47eb5b1659d16ca4e39f94c3162 Mon Sep 17 00:00:00 2001 From: Andy Cresswell Date: Tue, 22 Jul 2014 02:58:24 +0100 Subject: [PATCH] Update Aauth.php 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. --- application/libraries/Aauth.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 37634d8..9d908dc 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -100,8 +100,16 @@ class Aauth { $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']);