added fix for half-deleted sessions

This commit is contained in:
Roland Gruber 2007-11-17 14:18:59 +00:00
parent 03e9a75f81
commit 19cd235891
1 changed files with 6 additions and 0 deletions

View File

@ -228,6 +228,9 @@ class Ldap{
if (function_exists('mcrypt_create_iv')) { if (function_exists('mcrypt_create_iv')) {
// MCrypt may have been enabled in a running session // MCrypt may have been enabled in a running session
if (!isset($_COOKIE["IV"]) || ($_COOKIE["IV"] == '')) return $data; if (!isset($_COOKIE["IV"]) || ($_COOKIE["IV"] == '')) return $data;
if ($_COOKIE["IV"] == "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") {
return $data;
}
// read key and iv from cookie // read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]); $iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]); $key = base64_decode($_COOKIE["Key"]);
@ -251,6 +254,9 @@ class Ldap{
if (function_exists('mcrypt_create_iv')) { if (function_exists('mcrypt_create_iv')) {
// MCrypt may have been enabled in a running session // MCrypt may have been enabled in a running session
if (!isset($_COOKIE["IV"]) || ($_COOKIE["IV"] == '')) return $data; if (!isset($_COOKIE["IV"]) || ($_COOKIE["IV"] == '')) return $data;
if ($_COOKIE["IV"] == "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") {
return $data;
}
// read key and iv from cookie // read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]); $iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]); $key = base64_decode($_COOKIE["Key"]);