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:
@@ -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 : "."));
|
||||
|
Reference in New Issue
Block a user