1--TEST-- 2Bug #73058 crypt broken when salt is 'too' long 3--SKIPIF-- 4<?php 5if (!function_exists('crypt'))) { 6 die("SKIP crypt() is not available"); 7} 8?> 9--FILE-- 10<?php 11$pass = 'secret'; 12 13$salt = '$2y$07$usesomesillystringforsalt$'; 14var_dump(crypt($pass, $salt)); 15 16$salt = '$2y$07$usesomesillystringforsaltzzzzzzzzzzzzz$'; 17var_dump(crypt($pass, $salt)); 18 19$salt = '$2y$07$usesomesillystringforx'; 20var_dump(crypt($pass, $salt)); 21 22?> 23==OK== 24--EXPECT-- 25string(60) "$2y$07$usesomesillystringforex.u2VJUMLRWaJNuw0Hu2FvCEimdeYVO" 26string(60) "$2y$07$usesomesillystringforex.u2VJUMLRWaJNuw0Hu2FvCEimdeYVO" 27string(60) "$2y$07$usesomesillystringforuw2Gm1ef7lMsvtzSK2p/14F0q1e8uOCO" 28==OK== 29 30