]> git.joonet.de Git - adminer.git/commitdiff
Test $_COOKIE instead of SID (PHP bug #42135)
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 28 Jul 2007 22:36:24 +0000 (22:36 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 28 Jul 2007 22:36:24 +0000 (22:36 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@288 7c3ca157-0c34-0410-bff1-cbf682f78f5c

auth.inc.php

index 484ecbf5427d2211f3d132a005a9fbf8655ad4a2..cf51830e72ae75c8314582088ee12bcb16d74d66 100644 (file)
@@ -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 : "."));