Skip to content

Commit

Permalink
Improve robustness of test/zend/good/ext/standard/tests/strings/crypt…
Browse files Browse the repository at this point in the history
….php

Summary:
When no salt (2nd arg) is passed to crypt(), it uses C++ std::rand() to produce a hash,
causing the result to change based on whether calls to std::rand() are
inserted/removed prior to the call to crypt().  Change the test to match
any string hash returned by crypt() in such cases.

Reviewed By: mdko

Differential Revision: D66978809

fbshipit-source-id: f586ded68861f5b46aac23a87f95b481401c4e46
  • Loading branch information
ottoni authored and facebook-github-bot committed Dec 9, 2024
1 parent 6900058 commit a8bee72
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MD5
BLO

Notice: crypt(): No salt parameter was specified. You must use a randomly generated salt and a strong hash function to produce a secure hash. in %s/crypt.php on line 18
string(34) "$1$bJoWf/..$V6Bfi7.4Xu0zVFzgX/sY91"
string(34) %s

Warning: crypt() expects at least 1 parameter, 0 given in %s/crypt.php on line 19

Expand Down

0 comments on commit a8bee72

Please sign in to comment.