diff --git a/phpgwapi/inc/class.auth.inc.php b/phpgwapi/inc/class.auth.inc.php
index 8e7ce423f7..eafa80621d 100644
--- a/phpgwapi/inc/class.auth.inc.php
+++ b/phpgwapi/inc/class.auth.inc.php
@@ -216,10 +216,13 @@
{
/* Start with the first char after {SMD5} */
$hash = base64_decode(substr($db_val,6));
- $new_hash = mhash(MHASH_MD5,$form_val);
+ $orig_hash = substr($hash, 0, 16);
+ $salt = substr($hash, 16);
+
+ $new_hash = mhash(MHASH_MD5,$form_val . $salt);
//echo '
DB: ' . base64_encode($orig_hash) . '
FORM: ' . base64_encode($new_hash);
- if(strcmp($hash,$new_hash) == 0)
+ if(strcmp($orig_hash,$new_hash) == 0)
{
return True;
}