-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- crypt() fixes and sync with Solar Designer updates (rev. 295294, 29…
…5294, 295294, 295294, 295294, 295294)
- Loading branch information
1 parent
1d3534a
commit 7b02569
Showing
6 changed files
with
154 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--TEST-- | ||
Bug #51059 crypt() segfaults on certain salts | ||
--FILE-- | ||
<?php | ||
|
||
if (crypt('a', '_') === FALSE) echo 'OK'; | ||
else echo 'Not OK'; | ||
|
||
?> | ||
--EXPECT-- | ||
OK |
22 changes: 22 additions & 0 deletions
22
ext/standard/tests/strings/crypt_blowfish_invalid_rounds.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--TEST-- | ||
Test Blowfish crypt() with invalid rounds | ||
--FILE-- | ||
<?php | ||
|
||
foreach(range(32, 38) as $i) { | ||
if (crypt('U*U', '$2a$'.$i.'$CCCCCCCCCCCCCCCCCCCCCC$') === FALSE) { | ||
echo "$i. OK\n"; | ||
} else { | ||
echo "$i. Not OK\n"; | ||
} | ||
} | ||
|
||
?> | ||
--EXPECT-- | ||
32. OK | ||
33. OK | ||
34. OK | ||
35. OK | ||
36. OK | ||
37. OK | ||
38. OK |