1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 01:54:00 +02:00

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
This commit is contained in:
jakubvrana
2007-07-28 22:36:24 +00:00
parent 1eee0a1182
commit 3a6f81fb52

View 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 : "."));