mirror of
https://github.com/vrana/adminer.git
synced 2025-08-23 22:52:51 +02:00
Pass credentials to connect()
This commit is contained in:
@@ -163,7 +163,7 @@ if (isset($_GET["username"]) && is_string(get_password())) {
|
||||
auth_error(lang('Connecting to privileged ports is not allowed.'));
|
||||
}
|
||||
check_invalid_login();
|
||||
$connection = connect();
|
||||
$connection = connect($adminer->credentials());
|
||||
$driver = new Driver($connection);
|
||||
if ($adminer->operators === null) {
|
||||
$adminer->operators = $driver->operators;
|
||||
|
@@ -1302,7 +1302,7 @@ function slow_query($query) {
|
||||
$db = $adminer->database();
|
||||
$timeout = $adminer->queryTimeout();
|
||||
$slow_query = $driver->slowQuery($query, $timeout);
|
||||
if (!$slow_query && support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
|
||||
if (!$slow_query && support("kill") && is_object($connection2 = connect($adminer->credentials())) && ($db == "" || $connection2->select_db($db))) {
|
||||
$kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
|
||||
?>
|
||||
<script<?php echo nonce(); ?>>
|
||||
|
Reference in New Issue
Block a user