1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 16:17:48 +02:00

Rename variable to reduce confusion

This commit is contained in:
Jakub Vrana
2014-04-21 09:45:15 -07:00
parent 0c8cd8e5f7
commit ad96c516ac
2 changed files with 7 additions and 7 deletions

View File

@@ -57,26 +57,26 @@ if ($auth) {
auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60))); auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
} }
session_regenerate_id(); // defense against session fixation session_regenerate_id(); // defense against session fixation
$driver = $auth["driver"]; $vendor = $auth["driver"];
$server = $auth["server"]; $server = $auth["server"];
$username = $auth["username"]; $username = $auth["username"];
$password = (string) $auth["password"]; $password = (string) $auth["password"];
$db = $auth["db"]; $db = $auth["db"];
set_password($driver, $server, $username, $password); set_password($vendor, $server, $username, $password);
$_SESSION["db"][$driver][$server][$username][$db] = true; $_SESSION["db"][$vendor][$server][$username][$db] = true;
if ($auth["permanent"]) { if ($auth["permanent"]) {
$key = base64_encode($driver) . "-" . base64_encode($server) . "-" . base64_encode($username) . "-" . base64_encode($db); $key = base64_encode($vendor) . "-" . base64_encode($server) . "-" . base64_encode($username) . "-" . base64_encode($db);
$private = $adminer->permanentLogin(true); $private = $adminer->permanentLogin(true);
$permanent[$key] = "$key:" . base64_encode($private ? encrypt_string($password, $private) : ""); $permanent[$key] = "$key:" . base64_encode($private ? encrypt_string($password, $private) : "");
cookie("adminer_permanent", implode(" ", $permanent)); cookie("adminer_permanent", implode(" ", $permanent));
} }
if (count($_POST) == 1 // 1 - auth if (count($_POST) == 1 // 1 - auth
|| DRIVER != $driver || DRIVER != $vendor
|| SERVER != $server || SERVER != $server
|| $_GET["username"] !== $username // "0" == "00" || $_GET["username"] !== $username // "0" == "00"
|| DB != $db || DB != $db
) { ) {
redirect(auth_url($driver, $server, $username, $db)); redirect(auth_url($vendor, $server, $username, $db));
} }
} elseif ($_POST["logout"]) { } elseif ($_POST["logout"]) {

View File

@@ -1,2 +1,2 @@
<?php <?php
$VERSION = "4.1.0"; $VERSION = "4.1.1-dev";