Skip to content
Snippets Groups Projects
Commit 056cb2cc authored by Chris Smith's avatar Chris Smith
Browse files

Ensure 'smd5' password hashing method is only triggered when available

darcs-hash:20081013123417-f07c6-eaa5586edad17a971f4daf38afac77c6946539f0.gz
parent 31a282e6
No related branches found
No related tags found
No related merge requests found
...@@ -861,7 +861,7 @@ function auth_cryptPassword($clear,$method='',$salt=null){ ...@@ -861,7 +861,7 @@ function auth_cryptPassword($clear,$method='',$salt=null){
switch(strtolower($method)){ switch(strtolower($method)){
case 'smd5': case 'smd5':
if(defined('CRYPT_MD5')) return crypt($clear,'$1$'.substr($salt,0,8).'$'); if(defined('CRYPT_MD5') && CRYPT_MD5) return crypt($clear,'$1$'.substr($salt,0,8).'$');
// when crypt can't handle SMD5, falls through to pure PHP implementation // when crypt can't handle SMD5, falls through to pure PHP implementation
$magic = '1'; $magic = '1';
case 'apr1': case 'apr1':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment