mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12352] Do not check hashes that don't have the necessary length
This should significantly reduce the time spent on checking hashes of passwords that should be converted. PHPBB3-12352
This commit is contained in:
@@ -47,7 +47,7 @@ class md5_mybb extends base
|
||||
*/
|
||||
public function check($password, $hash, $user_row = array())
|
||||
{
|
||||
if (empty($hash) || !isset($user_row['user_passwd_salt']))
|
||||
if (empty($hash) || strlen($hash) != 32 || !isset($user_row['user_passwd_salt']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user