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:
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user