1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-04 07:47:34 +02:00

[feature/passwords] Add legacy support for md5 passwords

PHPBB3-11610
This commit is contained in:
Marc Alexander
2013-07-19 20:14:25 +02:00
parent bd4664807f
commit 2e453eb2cb
3 changed files with 4 additions and 4 deletions

View File

@@ -82,9 +82,9 @@ class phpbb_crypto_driver_salted_md5 extends phpbb_crypto_driver_base
*/
public function check($password, $hash)
{
if (strlen($hash) != 34)
if (strlen($hash) !== 34)
{
return false;
return (md5($password) === $hash) ? true : false;
}
// No need to check prefix, already did that in manage

View File

@@ -112,7 +112,7 @@ class phpbb_crypto_manager
*/
if (!preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $hash, $match))
{
return false;
return $this->type_map['$H$'];
}
// Be on the lookout for multiple hashing algorithms