mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 08:06:59 +02:00
List authentications
This commit is contained in:
@@ -28,13 +28,7 @@ if (isset($_POST["server"])) {
|
||||
|| SERVER != $_POST["server"]
|
||||
|| $_GET["username"] !== $_POST["username"] // "0" == "00"
|
||||
) {
|
||||
preg_match('~([^?]*)\\??(.*)~', remove_from_uri(implode("|", array_keys($drivers)) . "|username|" . session_name()), $match);
|
||||
redirect("$match[1]?"
|
||||
. (SID ? SID . "&" : "")
|
||||
. ($_POST["driver"] != "server" || $_POST["server"] != "" ? urlencode($_POST["driver"]) . "=" . urlencode($_POST["server"]) . "&" : "")
|
||||
. "username=" . urlencode($_POST["username"])
|
||||
. ($match[2] ? "&$match[2]" : "")
|
||||
);
|
||||
redirect(auth_url($_POST["driver"], $_POST["server"], $_POST["username"]));
|
||||
}
|
||||
} elseif ($_POST["logout"]) {
|
||||
if ($token && $_POST["token"] != $token) {
|
||||
@@ -67,9 +61,10 @@ function auth_error($exception = null) {
|
||||
if (($_COOKIE[$session_name] || $_GET[$session_name]) && !$token) {
|
||||
$error = lang('Session expired, please login again.');
|
||||
} else {
|
||||
$password = get_session("passwords");
|
||||
$password = &get_session("passwords");
|
||||
if (isset($password)) {
|
||||
$error = h($exception ? $exception->getMessage() : (is_string($connection) ? $connection : lang('Invalid credentials.')));
|
||||
$password = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user