mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[feature/passwords] Correctly supply hash salt and settings to bcrypt
PHPBB3-11610
This commit is contained in:
@@ -61,9 +61,8 @@ class phpbb_crypto_driver_bcrypt extends phpbb_crypto_driver_base
|
|||||||
*/
|
*/
|
||||||
public function check($password, $hash)
|
public function check($password, $hash)
|
||||||
{
|
{
|
||||||
$salt = substr($hash, strpos($hash, '$', 4) + 1, 22);
|
$salt = substr($hash, 0, 29);
|
||||||
var_dump('bcrypt salt: ' . $salt . ' with length ' . strlen($salt));
|
if (strlen($salt) != 29)
|
||||||
if (strlen($salt) != 22)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user