From 3a6f81fb52c430d386703fdd4c2ac6b7cd2c4438 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Sat, 28 Jul 2007 22:36:24 +0000 Subject: [PATCH] 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 --- auth.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 : "."));