summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorChris Smith <chris.eureka@jalakai.co.uk>2008-10-13 14:34:17 +0200
committerChris Smith <chris.eureka@jalakai.co.uk>2008-10-13 14:34:17 +0200
commit056cb2ccb4da10b9edc056f5ad283299f4524416 (patch)
treee366fa7a84d6b6bbaa20124b58fbab44e14d5aa4 /inc/auth.php
parent31a282e6ace8a86635e16de12e522686a8e947ce (diff)
downloadrpg-056cb2ccb4da10b9edc056f5ad283299f4524416.tar.gz
rpg-056cb2ccb4da10b9edc056f5ad283299f4524416.tar.bz2
Ensure 'smd5' password hashing method is only triggered when available
darcs-hash:20081013123417-f07c6-eaa5586edad17a971f4daf38afac77c6946539f0.gz
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/auth.php b/inc/auth.php
index 3966a4d47..87b5f80ee 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -861,7 +861,7 @@ function auth_cryptPassword($clear,$method='',$salt=null){
switch(strtolower($method)){
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
$magic = '1';
case 'apr1':