includes/sessions.php
changeset 941 9be6dba92adf
parent 915 91f4da84966f
child 953 323c4cd1aa37
equal deleted inserted replaced
940:645727469415 941:9be6dba92adf
   775           $this->sql('UPDATE '.table_prefix."users SET password = '$password_hmac', password_salt = '$hmac_secret', old_encryption = 0 WHERE user_id={$row['user_id']};");
   775           $this->sql('UPDATE '.table_prefix."users SET password = '$password_hmac', password_salt = '$hmac_secret', old_encryption = 0 WHERE user_id={$row['user_id']};");
   776         }
   776         }
   777         $success = true;
   777         $success = true;
   778       }
   778       }
   779     }
   779     }
   780     else if ( $row['old_encryption'] == 2 || ( defined('ENANO_UPGRADE_USE_AES_PASSWORDS') ) )
   780     else if ( $row['old_encryption'] == 2 || ( defined('ENANO_UPGRADE_USE_AES_PASSWORDS') ) && strlen($row['password']) != 40 )
   781     {
   781     {
   782       // Our password field uses the 1.0RC1-1.1.5 encryption format
   782       // Our password field uses the 1.0RC1-1.1.5 encryption format
   783       $real_pass = $aes->decrypt($row['password'], $this->private_key);
   783       $real_pass = $aes->decrypt($row['password'], $this->private_key);
   784       if($password === $real_pass)
   784       if($password === $real_pass)
   785       {
   785       {