diff options
author | Anthony Ferrara <ircmaxell@gmail.com> | 2012-10-06 10:38:41 -0400 |
---|---|---|
committer | Anthony Ferrara <ircmaxell@gmail.com> | 2012-10-06 10:38:41 -0400 |
commit | 1751d5fabeff466f08da560caa6f92222ade5a82 (patch) | |
tree | df54cfdce3f30ecb9c3c07cebc8225d66ca6e1a7 /ext/standard/tests/password/password_needs_rehash.phpt | |
parent | 25b2d364e995fc070ae16ee34f60d25148413769 (diff) | |
download | php-git-1751d5fabeff466f08da560caa6f92222ade5a82.tar.gz |
Really fix leaks, add test cases to prove it...
Diffstat (limited to 'ext/standard/tests/password/password_needs_rehash.phpt')
-rw-r--r-- | ext/standard/tests/password/password_needs_rehash.phpt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/standard/tests/password/password_needs_rehash.phpt b/ext/standard/tests/password/password_needs_rehash.phpt index 2fc3983980..734729e63d 100644 --- a/ext/standard/tests/password/password_needs_rehash.phpt +++ b/ext/standard/tests/password/password_needs_rehash.phpt @@ -26,6 +26,11 @@ var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9H $cost = str_pad(PASSWORD_BCRYPT_DEFAULT_COST, 2, '0', STR_PAD_LEFT); var_dump(password_needs_rehash('$2y$'.$cost.'$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT)); +// Should Issue Needs Rehash, Since Foo is cast to 0... +var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT, array('cost' => 'foo'))); + + + echo "OK!"; ?> --EXPECT-- @@ -36,4 +41,5 @@ bool(false) bool(true) bool(true) bool(false) +bool(true) OK! |