diff --git a/lam/HISTORY b/lam/HISTORY index 195cbd11..b89449dc 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,6 +1,7 @@ ??? 1.0.rc2 - fixed bugs: -> changed check for mail addresses (patch 1403922) + -> fixed JPG upload when MCrypt is enabled 09.01.2006 1.0.rc1 @@ -9,6 +10,7 @@ - fixed bugs: -> Samba groups: editing of special groups fixed + 14.12.2005 0.5.3 - accounts are now deleted with subentries - big update for Italian translation diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index 30d5170e..26cc79c1 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -359,7 +359,7 @@ class Ldap{ $iv = base64_decode($_COOKIE["IV"]); $key = base64_decode($_COOKIE["Key"]); // encrypt string - return mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $data, MCRYPT_MODE_ECB, $iv); + return mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, base64_encode($data), MCRYPT_MODE_ECB, $iv); } // otherwise do not encrypt else { @@ -381,7 +381,7 @@ class Ldap{ $key = base64_decode($_COOKIE["Key"]); // decrypt string $ret = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $data, MCRYPT_MODE_ECB, $iv); - $ret = str_replace(chr(00), "", $ret); + $ret = base64_decode(str_replace(chr(00), "", $ret)); return $ret; } // otherwise do not decrypt