From: jakubvrana Date: Sat, 28 Jul 2007 22:36:24 +0000 (+0000) Subject: Test $_COOKIE instead of SID (PHP bug #42135) X-Git-Tag: v3.0.0~1223 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=3a6f81fb52c430d386703fdd4c2ac6b7cd2c4438;p=adminer.git Test $_COOKIE instead of SID (PHP bug #42135) git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@288 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/auth.inc.php b/auth.inc.php index 484ecbf5..cf51830e 100644 --- a/auth.inc.php +++ b/auth.inc.php @@ -14,7 +14,7 @@ if (isset($_POST["server"])) { } else { $location = preg_replace('~^[^?]*/([^?]*).*~', '\\1', $_SERVER["REQUEST_URI"]) . (strlen($_POST["server"]) ? '?server=' . urlencode($_POST["server"]) : ''); } - if (strlen(SID)) { + if (!isset($_COOKIE[session_name()])) { $location .= (strpos($location, "?") === false ? "?" : "&") . SID; } header("Location: " . (strlen($location) ? $location : "."));