In an internal testsuite I discovered the following regression regarding known salts in the v1.0.4 release:
Testcase
public function testKnownSaltRegression() {
$hash = password_hash("foobar", PASSWORD_BCRYPT, array("cost" => 04, "salt" => "OyuaiuF.Bcw7mNCak/3Au7c="));
$this->assertEquals('$2y$04$T3l1YWl1Ri5CY3c3bU5DYOiIKqbbPpdcIiqpnkLoRwJkELw/uCaUO', $hash);
}
Resultmatrix
PHP
v1.0.3
v1.0.4
5.5.14
✔
✔
5.4.39
✔
✗
It's not really an issue for me because in the real application, a known salt is never used.
I suspect the provided salt OyuaiuF.Bcw7mNCak/3Au7c= is simply malformed/not valid and the issue is related to https://github.com/ircmaxell/password_compat/pull/38.
Because this is not a real issue for me feel free to close this issue.
Nevertheless I would love to understand what's the root cause of this regression and what was wrong with the salt in the first place.
I also fully understand that providing custom salts is a bad idea and will most probably remove that from my internal interfaces completely.
In an internal testsuite I discovered the following regression regarding known salts in the v1.0.4 release:
Testcase
Resultmatrix
It's not really an issue for me because in the real application, a known salt is never used. I suspect the provided salt
OyuaiuF.Bcw7mNCak/3Au7c=
is simply malformed/not valid and the issue is related to https://github.com/ircmaxell/password_compat/pull/38.Because this is not a real issue for me feel free to close this issue.
Nevertheless I would love to understand what's the root cause of this regression and what was wrong with the salt in the first place. I also fully understand that providing custom salts is a bad idea and will most probably remove that from my internal interfaces completely.