mirror of
https://github.com/php/php-src.git
synced 2024-09-24 19:37:26 +00:00
c402adc3b2
reject iteration counts encoded as 36 through 39. Previously, these would be misinterpreted as being the same as 04 through 07. (Solar Designer)
23 lines
295 B
PHP
23 lines
295 B
PHP
--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
|