mirror of
https://github.com/php/php-src.git
synced 2024-09-24 19:37:26 +00:00
MFH crypt() tests
This commit is contained in:
parent
116e217799
commit
7a0b1e55d8
13
ext/standard/tests/strings/bug51059.phpt
Normal file
13
ext/standard/tests/strings/bug51059.phpt
Normal file
@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #51059 crypt() segfaults on certain salts
|
||||
--XFAIL--
|
||||
Needs a patch from Pierre
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
if (crypt('a', '_') === FALSE) echo 'OK';
|
||||
else echo 'Not OK';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
OK
|
@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Test Blowfish crypt() with invalid rounds
|
||||
--XFAIL--
|
||||
Needs a patch from Pierre
|
||||
--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
|
Loading…
Reference in New Issue
Block a user