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

[feature/passwords] Make sure hash has the required length

Also added tests to make sure that crypto drivers are enforcing the hash
length.

PHPBB3-11610
This commit is contained in:
Marc Alexander
2013-06-16 23:55:33 +02:00
parent 7ddf004489
commit 4b81b93d10
2 changed files with 17 additions and 3 deletions

View File

@@ -53,6 +53,10 @@ class phpbb_crypto_driver_bcrypt extends phpbb_crypto_driver_base
}
$hash = crypt($password, $salt);
if (strlen($hash) < 60)
{
return false;
}
return $hash;
}