ridwanskaterock / cicool

Cicool is a multifunctional application that is used to facilitate your work in creating a system, CMS, E-Comerce and others
20 stars 13 forks source link

error when update password, but password still updated #340

Open galihlasahido opened 5 years ago

galihlasahido commented 5 years ago

error when update password, but password still updated, this is cause of file in Aauth in library folder, if you make an error with the condition

if ( strlen($pass) < $this->config_vars['min'] OR strlen($pass) > $this->config_vars['max'] ){

but you still have a code under it like this

$data['pass'] = $this->hash_password($pass, $user_id);

so itu make $data has a value,

        if ( !$valid || empty($data)) {
            return FALSE; 
        }

so i think it should be

        if ( !$valid) {
            return FALSE; 
        }

or you could do

if ( strlen($pass) < $this->config_vars['min'] OR strlen($pass) > $this->config_vars['max'] ){
    $this->error($this->CI->lang->line('aauth_error_password_invalid'));
    $valid = FALSE;
} else {
    $data['pass'] = $this->hash_password($pass, $user_id);
}
ridwanskaterock commented 5 years ago

ok what's your PHP version ?

i will try it on same environtment

galihlasahido commented 5 years ago

PHP 7.2.22

On Tue, 26 Nov 2019 at 14:52, Muhamad Ridwan notifications@github.com wrote:

ok what's your PHP version ?

i will try it on same environtment

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ridwanskaterock/cicool/issues/340?email_source=notifications&email_token=AAIO4RQDAD6M34VO6MYBMBLQVTISVA5CNFSM4JRK5PY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFFCAPI#issuecomment-558506045, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIO4RQVJ2EEUROYYFVBRM3QVTISVANCNFSM4JRK5PYQ .