summaryrefslogtreecommitdiff
path: root/inc/PassHash.class.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-07-01 11:31:29 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-07-01 11:33:25 +0200
commite6101bb6d72b59fd88801f5cb82fe5c3433b8010 (patch)
tree13710daa4db5bfc22b9beb701d5d53730d606050 /inc/PassHash.class.php
parent4e7a6f51c06205a3fa0bace15107df0e5057c8c3 (diff)
downloadrpg-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.
Diffstat (limited to 'inc/PassHash.class.php')
-rw-r--r--inc/PassHash.class.php2
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