diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 2ecf685f..49712dce 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -745,7 +745,7 @@ username.form['auth[driver]'].onchange(); $servers) { + foreach ((array) $_SESSION["pwds"] as $vendor => $servers) { foreach ($servers as $server => $usernames) { foreach ($usernames as $username => $password) { if ($password !== null) { @@ -753,9 +753,9 @@ username.form['auth[driver]'].onchange(); echo "
\n";
$first = false;
}
- $dbs = $_SESSION["db"][$driver][$server][$username];
+ $dbs = $_SESSION["db"][$vendor][$server][$username];
foreach (($dbs ? array_keys($dbs) : array("")) as $db) {
- echo "($drivers[$driver]) " . h($username . ($server != "" ? "@$server" : "") . ($db != "" ? " - $db" : "")) . "
\n";
+ echo "($drivers[$vendor]) " . h($username . ($server != "" ? "@$server" : "") . ($db != "" ? " - $db" : "")) . "
\n";
}
}
}
diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php
index 268f0f69..14070be4 100644
--- a/adminer/include/auth.inc.php
+++ b/adminer/include/auth.inc.php
@@ -52,17 +52,17 @@ if ($auth) {
$private = $adminer->permanentLogin();
foreach ($permanent as $key => $val) {
list(, $cipher) = explode(":", $val);
- list($driver, $server, $username, $db) = array_map('base64_decode', explode("-", $key));
- $_SESSION["pwds"][$driver][$server][$username] = decrypt_string(base64_decode($cipher), $private);
- $_SESSION["db"][$driver][$server][$username][$db] = true;
+ list($vendor, $server, $username, $db) = array_map('base64_decode', explode("-", $key));
+ $_SESSION["pwds"][$vendor][$server][$username] = decrypt_string(base64_decode($cipher), $private);
+ $_SESSION["db"][$vendor][$server][$username][$db] = true;
}
}
function unset_permanent() {
global $permanent;
foreach ($permanent as $key => $val) {
- list($driver, $server, $username, $db) = array_map('base64_decode', explode("-", $key));
- if ($driver == DRIVER && $server == SERVER && $username == $_GET["username"] && $db == DB) {
+ list($vendor, $server, $username, $db) = array_map('base64_decode', explode("-", $key));
+ if ($vendor == DRIVER && $server == SERVER && $username == $_GET["username"] && $db == DB) {
unset($permanent[$key]);
}
}
diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php
index 41c231e8..4e65a196 100644
--- a/adminer/include/functions.inc.php
+++ b/adminer/include/functions.inc.php
@@ -455,12 +455,12 @@ function set_session($key, $val) {
* @param string
* @return string
*/
-function auth_url($driver, $server, $username, $db = null) {
+function auth_url($vendor, $server, $username, $db = null) {
global $drivers;
preg_match('~([^?]*)\\??(.*)~', remove_from_uri(implode("|", array_keys($drivers)) . "|username|" . ($db !== null ? "db|" : "") . session_name()), $match);
return "$match[1]?"
. (sid() ? SID . "&" : "")
- . ($driver != "server" || $server != "" ? urlencode($driver) . "=" . urlencode($server) . "&" : "")
+ . ($vendor != "server" || $server != "" ? urlencode($vendor) . "=" . urlencode($server) . "&" : "")
. "username=" . urlencode($username)
. ($db != "" ? "&db=" . urlencode($db) : "")
. ($match[2] ? "&$match[2]" : "")