1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[feature/passwords] Move check for 8-bit characters to bcrypt driver

PHPBB3-11610
This commit is contained in:
Marc Alexander
2013-10-07 16:00:52 +02:00
parent 035db5e08b
commit f1d2949985
2 changed files with 10 additions and 10 deletions

View File

@@ -214,16 +214,6 @@ class manager
return false;
}
// Do not support 8-bit characters with $2a$ bcrypt
// Also see http://www.php.net/security/crypt_blowfish.php
if ($type === 'passwords.driver.bcrypt' || ($type === 'passwords.driver.bcrypt_2y' && !$hashing_algorithm->is_supported()))
{
if (ord($password[strlen($password)-1]) & 128)
{
return false;
}
}
return $hashing_algorithm->hash($password);
}