diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-07-01 11:31:29 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-07-01 11:33:25 +0200 |
commit | e6101bb6d72b59fd88801f5cb82fe5c3433b8010 (patch) | |
tree | 13710daa4db5bfc22b9beb701d5d53730d606050 | |
parent | 4e7a6f51c06205a3fa0bace15107df0e5057c8c3 (diff) | |
download | rpg-e6101bb6d72b59fd88801f5cb82fe5c3433b8010.tar.gz rpg-e6101bb6d72b59fd88801f5cb82fe5c3433b8010.tar.bz2 |
make MD5 crypt without salts always use PHP implementation
crypt seems to behave different on different systems when the salt
is empty.
-rw-r--r-- | inc/PassHash.class.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index f85766723..13be479cc 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -132,7 +132,7 @@ class PassHash { public function hash_smd5($clear, $salt = null) { $this->init_salt($salt, 8); - if(defined('CRYPT_MD5') && CRYPT_MD5) { + if(defined('CRYPT_MD5') && CRYPT_MD5 && $salt !== '') { return crypt($clear, '$1$'.$salt.'$'); } else { // Fall back to PHP-only implementation |