crypt(): raise a notice if no salt
| 5.6.0 | Raise E_NOTICE security warning if salt is omitted. |
|---|
Result: http://3v4l.org/8K3Ob In recent releases of php appears unsafe behavior in the absence of salt:
hhvm-3.0.1 - 3.4.0:
string(34) "$1$bJoWf/..$mTgm1g69VfN9GIbOKxYPv0"
string(34) "$1$4DmSm...$LT1vPcM6123p5LRkQVZrs1"
string(34) "$1$dV7DY/..$pZStzg9hvGAcTg5clHhqp."
Output for 5.6.3:
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 /in/8K3Ob on line 4
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 /in/8K3Ob on line 5
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 /in/8K3Ob on line 6
string(34) "$1$YNMNnxw2$CdQixoEVsaI6XjVyjB1dZ1"
string(34) "$1$Led6ElOJ$WhfQd3/YD0OAyine4P7yD."
string(34) "$1$toyOWA0X$QLYH3zVNmjAVhavpAlfQN0"
In addition to the above, there are performance issues: http://3v4l.org/8K3Ob/perf#tabs
I will work on it
message crypt() no salt parameters specified.you must use a randomly generated salt and strong hash function to a produce secure hash.
How to solve the problem?
@samaiyan You must use the Password Hashing API (password_hash, password_verify, password_needs_rehash) and Safe comparison for preventing time attack hash_equals (CSRF / hash compare).
For example, two safe mechanism of salt openssl_random_pseudo_bytes, mcrypt_create_iv.
If you are not specialist and will not be able to initialize a persistent vector for mcrypt (IV) the hash will be extremely weak, still recommend Hashing API.
password_hashis compatible withcrypt
References:
decription: i am using codeigniter framework. this issue only for latest PHP version. after signup just flash message.
error message: message crypt() no salt parameters specified.you must use a randomly generated salt and strong hash function to a produce secure hash.
How to solve the problem?can you help me....................
decription: i am using codeigniter framework. this issue only for latest PHP version. after signup just flash message error.
error message:
PHP error was encountered; sevenity:Notice message crypt() no salt parameters specified.you must use a randomly generated salt and strong hash function to a produce secure hash. File path:libraries/Dx_auth.php Line number:0
But correct to work....
any change for my coding sir?
How to solve the problem?can you help me....................
Thank You
hi gi,
decription: i am using codeigniter framework. this issue only for latest PHP version. after signup just flash message error.
error message:
PHP error was encountered; sevenity:Notice message crypt() no salt parameters specified.you must use a randomly generated salt and strong hash function to a produce secure hash. File path:libraries/Dx_auth.php Line number:0
@samaiyan that sounds like a problem you should bring up with Code Igniter. It's not related to HHVM.