From 1c5947de5010bbb75c1217bf724e322fe34346ed Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Fri, 19 Jan 2024 00:29:25 +0100 Subject: [PATCH 1/6] Validate server input - Allow only scheme, host and port in the server field. - Use proper default host and port in Elasticsearch and ClickHouse driver. --- adminer/drivers/elastic.inc.php | 10 ++++- adminer/include/auth.inc.php | 66 +++++++++++++++++++++++++++++---- plugins/drivers/clickhouse.php | 10 ++++- 3 files changed, 74 insertions(+), 12 deletions(-) diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 799f6d0b..98651c64 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -58,9 +58,15 @@ if (isset($_GET["elastic"])) { return $this->rootQuery(($this->_db != "" ? "$this->_db/" : "/") . ltrim($path, '/'), $content, $method); } + /** + * @param string $server + * @param string $username + * @param string $password + * @return bool + */ function connect($server, $username, $password) { - preg_match('~^(https?://)?(.*)~', $server, $match); - $this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]"; + $this->_url = build_http_url($server, $username, $password, "localhost", 9200); + $return = $this->query(''); if ($return) { $this->server_info = $return['version']['number']; diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php index ed104154..296b2669 100644 --- a/adminer/include/auth.inc.php +++ b/adminer/include/auth.inc.php @@ -15,6 +15,58 @@ if ($_COOKIE["adminer_permanent"]) { } } +function validate_server_input() { + if (SERVER == "") { + return; + } + + $parts = parse_url(SERVER); + if (!$parts) { + auth_error(lang('Invalid credentials.')); + } + + // Check proper URL parts. + if (isset($parts['user']) || isset($parts['pass']) || isset($parts['query']) || isset($parts['fragment'])) { + auth_error(lang('Invalid credentials.')); + } + + // Allow only HTTP/S scheme. + if (isset($parts['scheme']) && !preg_match('~^(https?)$~i', $parts['scheme'])) { + auth_error(lang('Invalid credentials.')); + } + + // Allow only host without a path. Note that "localhost" is parsed as path. + $host = (isset($parts['host']) ? $parts['host'] : '') . (isset($parts['path']) ? $parts['path'] : ''); + if (strpos(rtrim($host, '/'), '/') !== false) { + auth_error(lang('Invalid credentials.')); + } + + // Check privileged ports. + if (isset($parts['port']) && ($parts['port'] < 1024 || $parts['port'] > 65535)) { + auth_error(lang('Connecting to privileged ports is not allowed.')); + } +} + +/** + * @param string $server + * @param string $username + * @param string $password + * @param string $defaultServer + * @param int|null $defaultPort + * @return string + */ +function build_http_url($server, $username, $password, $defaultServer, $defaultPort = null) { + if (!preg_match('~^(https?://)?([^:]*)(:\d+)?$~', rtrim($server, '/'), $matches)) { + $this->error = lang('Invalid credentials.'); + return false; + } + + return ($matches[1] ?: "http://") . + ($username !== "" || $password !== "" ? "$username:$password@" : "") . + ($matches[2] !== "" ? $matches[2] : $defaultServer) . + (isset($matches[3]) ? $matches[3] : ($defaultPort ? ":$defaultPort" : "")); +} + function add_invalid_login() { global $adminer; $fp = file_open_lock(get_temp_dir() . "/adminer.invalid"); @@ -52,7 +104,7 @@ $auth = $_POST["auth"]; if ($auth) { session_regenerate_id(); // defense against session fixation $vendor = $auth["driver"]; - $server = $auth["server"]; + $server = trim($auth["server"]); $username = $auth["username"]; $password = (string) $auth["password"]; $db = $auth["db"]; @@ -72,14 +124,14 @@ if ($auth) { ) { redirect(auth_url($vendor, $server, $username, $db)); } - + } elseif ($_POST["logout"] && (!$has_token || verify_token())) { foreach (array("pwds", "db", "dbs", "queries") as $key) { set_session($key, null); } unset_permanent(); redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.') . ' ' . lang('Thanks for using Adminer, consider donating.')); - + } elseif ($permanent && !$_SESSION["pwds"]) { session_regenerate_id(); $private = $adminer->permanentLogin(); @@ -155,11 +207,9 @@ if (isset($_GET["username"]) && !class_exists("Min_DB")) { stop_session(true); if (isset($_GET["username"]) && is_string(get_password())) { - list($host, $port) = explode(":", SERVER, 2); - if (preg_match('~^\s*([-+]?\d+)~', $port, $match) && ($match[1] < 1024 || $match[1] > 65535)) { // is_numeric('80#') would still connect to port 80 - auth_error(lang('Connecting to privileged ports is not allowed.')); - } + validate_server_input(); check_invalid_login(); + $connection = connect(); $driver = new Min_Driver($connection); } @@ -199,7 +249,7 @@ if ($_POST) { : lang('Invalid CSRF token. Send the form again.') . ' ' . lang('If you did not send this request from Adminer then close this page.') ); } - + } elseif ($_SERVER["REQUEST_METHOD"] == "POST") { // posted form with no data means that post_max_size exceeded because Adminer always sends token at least $error = lang('Too big POST data. Reduce the data or increase the %s configuration directive.', "'post_max_size'"); diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php index 60bb0b45..e489038f 100644 --- a/plugins/drivers/clickhouse.php +++ b/plugins/drivers/clickhouse.php @@ -55,9 +55,15 @@ if (isset($_GET["clickhouse"])) { return $this->rootQuery($this->_db, $query); } + /** + * @param string $server + * @param string $username + * @param string $password + * @return bool + */ function connect($server, $username, $password) { - preg_match('~^(https?://)?(.*)~', $server, $match); - $this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]"; + $this->_url = build_http_url($server, $username, $password, "localhost", 8123); + $return = $this->query('SELECT 1'); return (bool) $return; } From 9eb4d00564458f400ed2b7a2344e9f8ce4a85c90 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Thu, 25 Jan 2024 13:43:18 +0100 Subject: [PATCH 2/6] Disable redirections in HTTP based drivers --- adminer/drivers/elastic.inc.php | 8 +++++--- plugins/drivers/clickhouse.php | 4 +++- plugins/drivers/simpledb.php | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 98651c64..96133fbf 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -18,9 +18,11 @@ if (isset($_GET["elastic"])) { @ini_set('track_errors', 1); // @ - may be disabled $file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array( 'method' => $method, - 'content' => $content === null ? $content : json_encode($content), - 'header' => 'Content-Type: application/json', - 'ignore_errors' => 1, // available since PHP 5.2.10 + 'content' => $content !== null ? json_encode($content) : null, + 'header' => $content !== null ? 'Content-Type: application/json' : [], + 'ignore_errors' => 1, + 'follow_location' => 0, + 'max_redirects' => 0, )))); if (!$file) { $this->error = $php_errormsg; diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php index e489038f..1d188219 100644 --- a/plugins/drivers/clickhouse.php +++ b/plugins/drivers/clickhouse.php @@ -14,7 +14,9 @@ if (isset($_GET["clickhouse"])) { 'method' => 'POST', 'content' => $this->isQuerySelectLike($query) ? "$query FORMAT JSONCompact" : $query, 'header' => 'Content-type: application/x-www-form-urlencoded', - 'ignore_errors' => 1, // available since PHP 5.2.10 + 'ignore_errors' => 1, + 'follow_location' => 0, + 'max_redirects' => 0, )))); if ($file === false) { diff --git a/plugins/drivers/simpledb.php b/plugins/drivers/simpledb.php index 9fafe884..30577d88 100644 --- a/plugins/drivers/simpledb.php +++ b/plugins/drivers/simpledb.php @@ -425,7 +425,9 @@ if (isset($_GET["simpledb"])) { $file = @file_get_contents((preg_match('~^https?://~', $host) ? $host : "http://$host"), false, stream_context_create(array('http' => array( 'method' => 'POST', // may not fit in URL with GET 'content' => $query, - 'ignore_errors' => 1, // available since PHP 5.2.10 + 'ignore_errors' => 1, + 'follow_location' => 0, + 'max_redirects' => 0, )))); if (!$file) { $connection->error = $php_errormsg; From 338c81e2a3de9d3bb209711968fb9680c807c3af Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Sat, 20 Jan 2024 00:29:12 +0100 Subject: [PATCH 3/6] Validate server connection in Elasticsearch and ClickHouse drivers --- adminer/drivers/elastic.inc.php | 71 +++++++++++++++++--------------- plugins/drivers/clickhouse.php | 72 +++++++++++++++++++++------------ 2 files changed, 84 insertions(+), 59 deletions(-) diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 96133fbf..69f273ba 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -8,13 +8,13 @@ if (isset($_GET["elastic"])) { class Min_DB { var $extension = "JSON", $server_info, $errno, $error, $_url, $_db; - /** Performs query - * @param string - * @param array - * @param string - * @return mixed + /** + * @param string $path + * @param array|null $content + * @param string $method + * @return array|false */ - function rootQuery($path, $content = array(), $method = 'GET') { + function rootQuery($path, array $content = null, $method = 'GET') { @ini_set('track_errors', 1); // @ - may be disabled $file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array( 'method' => $method, @@ -24,39 +24,37 @@ if (isset($_GET["elastic"])) { 'follow_location' => 0, 'max_redirects' => 0, )))); - if (!$file) { - $this->error = $php_errormsg; - return $file; - } - if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) { - $this->error = lang('Invalid credentials.') . " $http_response_header[0]"; + + if ($file === false) { + $this->error = lang('Invalid credentials.'); return false; } + $return = json_decode($file, true); if ($return === null) { - $this->errno = json_last_error(); - if (function_exists('json_last_error_msg')) { - $this->error = json_last_error_msg(); - } else { - $constants = get_defined_constants(true); - foreach ($constants['json'] as $name => $value) { - if ($value == $this->errno && preg_match('~^JSON_ERROR_~', $name)) { - $this->error = $name; - break; - } - } - } + $this->error = lang('Invalid credentials.'); + return false; } + + if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) { + if (isset($return['error']['root_cause'][0]['type'])) { + $this->error = $return['error']['root_cause'][0]['type'] . ": " . $return['error']['root_cause'][0]['reason']; + } else { + $this->error = lang('Invalid credentials.'); + } + return false; + } + return $return; } /** Performs query relative to actual selected DB - * @param string - * @param array - * @param string - * @return mixed + * @param string $path + * @param array|null $content + * @param string $method + * @return array|false */ - function query($path, $content = array(), $method = 'GET') { + function query($path, array $content = null, $method = 'GET') { return $this->rootQuery(($this->_db != "" ? "$this->_db/" : "/") . ltrim($path, '/'), $content, $method); } @@ -70,10 +68,17 @@ if (isset($_GET["elastic"])) { $this->_url = build_http_url($server, $username, $password, "localhost", 9200); $return = $this->query(''); - if ($return) { - $this->server_info = $return['version']['number']; + if (!$return) { + return false; } - return (bool) $return; + + if (!isset($return['version']['number'])) { + $this->error = lang('Invalid credentials.'); + return false; + } + + $this->server_info = $return['version']['number']; + return true; } function select_db($database) { @@ -270,7 +275,7 @@ if (isset($_GET["elastic"])) { function db_collation($db, $collations) { } - + function engines() { return array(); } diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php index 1d188219..2e1d95c4 100644 --- a/plugins/drivers/clickhouse.php +++ b/plugins/drivers/clickhouse.php @@ -8,6 +8,11 @@ if (isset($_GET["clickhouse"])) { var $extension = "JSON", $server_info, $errno, $_result, $error, $_url; var $_db = 'default'; + /** + * @param string $db + * @param string $query + * @return Min_Result|bool + */ function rootQuery($db, $query) { @ini_set('track_errors', 1); // @ - may be disabled $file = @file_get_contents("$this->_url/?database=$db", false, stream_context_create(array('http' => array( @@ -20,39 +25,48 @@ if (isset($_GET["clickhouse"])) { )))); if ($file === false) { - $this->error = $php_errormsg; - return $file; - } - if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) { - $this->error = lang('Invalid credentials.') . " $http_response_header[0]"; + $this->error = lang('Invalid credentials.'); return false; } - $return = json_decode($file, true); - if ($return === null) { - if (!$this->isQuerySelectLike($query) && $file === '') { - return true; - } - $this->errno = json_last_error(); - if (function_exists('json_last_error_msg')) { - $this->error = json_last_error_msg(); - } else { - $constants = get_defined_constants(true); - foreach ($constants['json'] as $name => $value) { - if ($value == $this->errno && preg_match('~^JSON_ERROR_~', $name)) { - $this->error = $name; - break; - } + if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) { + foreach ($http_response_header as $header) { + if (preg_match('~^X-ClickHouse-Exception-Code:~i', $header)) { + $this->error = preg_replace('~\(version [^(]+\(.+$~', '', $file); + return false; } } + + $this->error = lang('Invalid credentials.'); + return false; } - return new Min_Result($return); + + if (!$this->isQuerySelectLike($query) && $file === '') { + return true; + } + + $return = json_decode($file, true); + if ($return === null) { + $this->error = lang('Invalid credentials.'); + return false; + } + + if (!isset($return['rows']) || !isset($return['data']) || !isset($return['meta'])) { + $this->error = lang('Invalid credentials.'); + return false; + } + + return new Min_Result($return['rows'], $return['data'], $return['meta']); } function isQuerySelectLike($query) { return (bool) preg_match('~^(select|show)~i', $query); } + /** + * @param string $query + * @return bool|Min_Result + */ function query($query) { return $this->rootQuery($this->_db, $query); } @@ -100,11 +114,17 @@ if (isset($_GET["clickhouse"])) { class Min_Result { var $num_rows, $_rows, $columns, $meta, $_offset = 0; - function __construct($result) { - $this->num_rows = $result['rows']; - $this->_rows = $result['data']; - $this->meta = $result['meta']; - $this->columns = array_column($this->meta, 'name'); + /** + * @param int $rows + * @param array[] $data + * @param array[] $meta + */ + function __construct($rows, array $data, array $meta) { + $this->num_rows = $rows; + $this->_rows = $data; + $this->meta = $meta; + $this->columns = array_column($meta, 'name'); + reset($this->_rows); } From e69583a8000e370f823c8c2c22eb6d648f41556f Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Thu, 25 Jan 2024 14:50:04 +0100 Subject: [PATCH 4/6] Validate server connection in SimpleDB driver --- plugins/drivers/simpledb.php | 57 +++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/plugins/drivers/simpledb.php b/plugins/drivers/simpledb.php index 30577d88..5264cce2 100644 --- a/plugins/drivers/simpledb.php +++ b/plugins/drivers/simpledb.php @@ -6,13 +6,49 @@ if (isset($_GET["simpledb"])) { if (class_exists('SimpleXMLElement') && ini_bool('allow_url_fopen')) { class Min_DB { - var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result; + var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_url, $_result; + + /** + * @param string $server + * @param string $password + * @return bool + */ + function connect($server, $password) { + if ($server == '' || $password == '') { + $this->error = lang('Invalid credentials.'); + return false; + } + + $parts = parse_url($server); + + if (!$parts || !isset($parts['host']) || !preg_match('~^sdb\.([a-z0-9-]+\.)?amazonaws\.com$~i', $parts['host']) || + isset($parts['port']) + ) { + $this->error = lang('Invalid credentials.'); + return false; + } + + $this->_url = build_http_url($server, '', '', ''); + + return (bool) $this->workaroundLoginRequest('ListDomains', ['MaxNumberOfDomains' => 1]); + } + + // FIXME: This is so wrong :-( Move sdb_request to Min_DB! + private function workaroundLoginRequest($action, $params = array()) { + global $connection; + + $connection = $this; + $result = sdb_request($action, $params); + $connection = null; + + return $result; + } function select_db($database) { return ($database == "domain"); } - function query($query, $unbuffered = false) { + function query($query) { $params = array('SelectExpression' => $query, 'ConsistentRead' => 'true'); if ($this->next) { $params['NextToken'] = $this->next; @@ -248,11 +284,15 @@ if (isset($_GET["simpledb"])) { function connect() { global $adminer; - list(, , $password) = $adminer->credentials(); - if ($password != "") { - return lang('Database does not support password.'); + + $connection = new Min_DB; + + list($server, , $password) = $adminer->credentials(); + if ($connection->connect($server, $password)) { + return $connection; } - return new Min_DB; + + return $connection->error; } function support($feature) { @@ -422,7 +462,8 @@ if (isset($_GET["simpledb"])) { $query = str_replace('%7E', '~', substr($query, 1)); $query .= "&Signature=" . urlencode(base64_encode(hmac('sha1', "POST\n" . preg_replace('~^https?://~', '', $host) . "\n/\n$query", $secret, true))); @ini_set('track_errors', 1); // @ - may be disabled - $file = @file_get_contents((preg_match('~^https?://~', $host) ? $host : "http://$host"), false, stream_context_create(array('http' => array( + + $file = @file_get_contents($connection->_url, false, stream_context_create(array('http' => array( 'method' => 'POST', // may not fit in URL with GET 'content' => $query, 'ignore_errors' => 1, @@ -430,7 +471,7 @@ if (isset($_GET["simpledb"])) { 'max_redirects' => 0, )))); if (!$file) { - $connection->error = $php_errormsg; + $connection->error = error_get_last()['message']; return false; } libxml_use_internal_errors(true); From 55a7d3864f594d00e2702cd5fecd6620539315ce Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Fri, 26 Jan 2024 10:21:18 +0100 Subject: [PATCH 5/6] Change 'Invalid credentials.' message --- adminer/drivers/elastic.inc.php | 8 ++++---- adminer/include/auth.inc.php | 12 ++++++------ adminer/lang/ar.inc.php | 2 +- adminer/lang/bg.inc.php | 2 +- adminer/lang/bn.inc.php | 2 +- adminer/lang/bs.inc.php | 2 +- adminer/lang/ca.inc.php | 2 +- adminer/lang/cs.inc.php | 2 +- adminer/lang/da.inc.php | 2 +- adminer/lang/de.inc.php | 2 +- adminer/lang/el.inc.php | 2 +- adminer/lang/es.inc.php | 2 +- adminer/lang/et.inc.php | 2 +- adminer/lang/fa.inc.php | 2 +- adminer/lang/fi.inc.php | 2 +- adminer/lang/fr.inc.php | 2 +- adminer/lang/gl.inc.php | 2 +- adminer/lang/he.inc.php | 2 +- adminer/lang/hu.inc.php | 2 +- adminer/lang/id.inc.php | 2 +- adminer/lang/it.inc.php | 2 +- adminer/lang/ja.inc.php | 2 +- adminer/lang/ka.inc.php | 2 +- adminer/lang/ko.inc.php | 2 +- adminer/lang/lt.inc.php | 2 +- adminer/lang/lv.inc.php | 2 +- adminer/lang/ms.inc.php | 2 +- adminer/lang/nl.inc.php | 2 +- adminer/lang/no.inc.php | 2 +- adminer/lang/pl.inc.php | 2 +- adminer/lang/pt-br.inc.php | 2 +- adminer/lang/pt.inc.php | 2 +- adminer/lang/ro.inc.php | 2 +- adminer/lang/ru.inc.php | 2 +- adminer/lang/sk.inc.php | 2 +- adminer/lang/sl.inc.php | 2 +- adminer/lang/sr.inc.php | 2 +- adminer/lang/sv.inc.php | 2 +- adminer/lang/ta.inc.php | 2 +- adminer/lang/th.inc.php | 2 +- adminer/lang/tr.inc.php | 2 +- adminer/lang/uk.inc.php | 2 +- adminer/lang/vi.inc.php | 2 +- adminer/lang/xx.inc.php | 2 +- adminer/lang/zh-tw.inc.php | 2 +- adminer/lang/zh.inc.php | 2 +- plugins/drivers/clickhouse.php | 8 ++++---- plugins/drivers/simpledb.php | 4 ++-- 48 files changed, 60 insertions(+), 60 deletions(-) diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 69f273ba..c570c14e 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -26,13 +26,13 @@ if (isset($_GET["elastic"])) { )))); if ($file === false) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } $return = json_decode($file, true); if ($return === null) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } @@ -40,7 +40,7 @@ if (isset($_GET["elastic"])) { if (isset($return['error']['root_cause'][0]['type'])) { $this->error = $return['error']['root_cause'][0]['type'] . ": " . $return['error']['root_cause'][0]['reason']; } else { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); } return false; } @@ -73,7 +73,7 @@ if (isset($_GET["elastic"])) { } if (!isset($return['version']['number'])) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php index 296b2669..c907e823 100644 --- a/adminer/include/auth.inc.php +++ b/adminer/include/auth.inc.php @@ -22,23 +22,23 @@ function validate_server_input() { $parts = parse_url(SERVER); if (!$parts) { - auth_error(lang('Invalid credentials.')); + auth_error(lang('Invalid server or credentials.')); } // Check proper URL parts. if (isset($parts['user']) || isset($parts['pass']) || isset($parts['query']) || isset($parts['fragment'])) { - auth_error(lang('Invalid credentials.')); + auth_error(lang('Invalid server or credentials.')); } // Allow only HTTP/S scheme. if (isset($parts['scheme']) && !preg_match('~^(https?)$~i', $parts['scheme'])) { - auth_error(lang('Invalid credentials.')); + auth_error(lang('Invalid server or credentials.')); } // Allow only host without a path. Note that "localhost" is parsed as path. $host = (isset($parts['host']) ? $parts['host'] : '') . (isset($parts['path']) ? $parts['path'] : ''); if (strpos(rtrim($host, '/'), '/') !== false) { - auth_error(lang('Invalid credentials.')); + auth_error(lang('Invalid server or credentials.')); } // Check privileged ports. @@ -57,7 +57,7 @@ function validate_server_input() { */ function build_http_url($server, $username, $password, $defaultServer, $defaultPort = null) { if (!preg_match('~^(https?://)?([^:]*)(:\d+)?$~', rtrim($server, '/'), $matches)) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } @@ -216,7 +216,7 @@ if (isset($_GET["username"]) && is_string(get_password())) { $login = null; if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) { - $error = (is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid credentials.'))); + $error = (is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid server or credentials.'))); auth_error($error . (preg_match('~^ | $~', get_password()) ? '
' . lang('There is a space in the input password which might be the cause.') : '')); } diff --git a/adminer/lang/ar.inc.php b/adminer/lang/ar.inc.php index 82164d66..53a9d4b6 100644 --- a/adminer/lang/ar.inc.php +++ b/adminer/lang/ar.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'تسجيل الدخول', 'Logout successful.' => 'تم تسجيل الخروج بنجاح.', - 'Invalid credentials.' => 'بيانات الدخول غير صالحة.', + 'Invalid server or credentials.' => null, 'Server' => 'الخادم', 'Username' => 'اسم المستخدم', 'Password' => 'كلمة المرور', diff --git a/adminer/lang/bg.inc.php b/adminer/lang/bg.inc.php index 3c11d528..1677aefc 100644 --- a/adminer/lang/bg.inc.php +++ b/adminer/lang/bg.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Изход', 'Logged as: %s' => 'Текущ потребител: %s', 'Logout successful.' => 'Излизането е успешно.', - 'Invalid credentials.' => 'Невалидни потребителски данни.', + 'Invalid server or credentials.' => null, 'Too many unsuccessful logins, try again in %d minute(s).' => array('Прекалено много неуспешни опити за вход, опитайте пак след %d минута.', 'Прекалено много неуспешни опити за вход, опитайте пак след %d минути.'), 'Master password expired. Implement %s method to make it permanent.' => 'Главната парола вече е невалидна. Изберете %s метод, за да я направите постоянна.', 'Language' => 'Език', diff --git a/adminer/lang/bn.inc.php b/adminer/lang/bn.inc.php index 981c687f..ff7ef2ac 100644 --- a/adminer/lang/bn.inc.php +++ b/adminer/lang/bn.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'লগইন', 'Logout successful.' => 'সফলভাবে লগআউট হয়েছে।', - 'Invalid credentials.' => 'ভুল পাসওয়ার্ড।', + 'Invalid server or credentials.' => null, 'Server' => 'সার্ভার', 'Username' => 'ইউজারের নাম', 'Password' => 'পাসওয়ার্ড', diff --git a/adminer/lang/bs.inc.php b/adminer/lang/bs.inc.php index ecc8c921..338d9b0c 100644 --- a/adminer/lang/bs.inc.php +++ b/adminer/lang/bs.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Odjava', 'Logged as: %s' => 'Prijavi se kao: %s', 'Logout successful.' => 'Uspešna odjava.', - 'Invalid credentials.' => 'Nevažeće dozvole.', + 'Invalid server or credentials.' => null, 'Language' => 'Jezik', 'Invalid CSRF token. Send the form again.' => 'Nevažeći CSRF kod. Proslijedite ponovo formu.', 'No extension' => 'Bez dodataka', diff --git a/adminer/lang/ca.inc.php b/adminer/lang/ca.inc.php index 6c5b3050..bc6321b7 100644 --- a/adminer/lang/ca.inc.php +++ b/adminer/lang/ca.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Inicia la sessió', 'Logout successful.' => 'Desconnexió correcta.', - 'Invalid credentials.' => 'Credencials invàlides.', + 'Invalid server or credentials.' => null, 'Server' => 'Servidor', 'Username' => 'Nom d\'usuari', 'Password' => 'Contrasenya', diff --git a/adminer/lang/cs.inc.php b/adminer/lang/cs.inc.php index 7dfca2a3..c00a0e71 100644 --- a/adminer/lang/cs.inc.php +++ b/adminer/lang/cs.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => 'Přihlášen jako: %s', 'Logout successful.' => 'Odhlášení proběhlo v pořádku.', 'Thanks for using Adminer, consider donating.' => 'Díky za použití Admineru, přispějte na vývoj.', - 'Invalid credentials.' => 'Neplatné přihlašovací údaje.', + 'Invalid server or credentials.' => 'Neplatný server nebo přihlašovací údaje.', 'There is a space in the input password which might be the cause.' => 'Problém může být, že je v zadaném hesle mezera.', 'Adminer does not support accessing a database without a password, more information.' => 'Adminer nepodporuje přístup k databázi bez hesla, více informací.', 'Database does not support password.' => 'Databáze nepodporuje heslo.', diff --git a/adminer/lang/da.inc.php b/adminer/lang/da.inc.php index 73bb9e68..b896d749 100644 --- a/adminer/lang/da.inc.php +++ b/adminer/lang/da.inc.php @@ -9,7 +9,7 @@ $translations = array( 'Logout' => 'Log ud', 'Logged as: %s' => 'Logget ind som: %s', 'Logout successful.' => 'Log af vellykket.', - 'Invalid credentials.' => 'Ugyldige log ind oplysninger.', + 'Invalid server or credentials.' => null, 'Master password expired. Implement %s method to make it permanent.' => 'Master-kodeordet er udløbet. Implementer en metode for %s for at gøre det permanent.', 'Language' => 'Sprog', 'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.', diff --git a/adminer/lang/de.inc.php b/adminer/lang/de.inc.php index 96da795e..3152e63b 100644 --- a/adminer/lang/de.inc.php +++ b/adminer/lang/de.inc.php @@ -3,7 +3,7 @@ $translations = array( 'Login' => 'Login', 'Logout successful.' => 'Abmeldung erfolgreich.', 'Thanks for using Adminer, consider donating.' => 'Danke, dass Sie Adminer genutzt haben. Spenden willkommen!', - 'Invalid credentials.' => 'Ungültige Anmelde-Informationen.', + 'Invalid server or credentials.' => 'Ungültige Server oder Anmelde-Informationen.', 'Server' => 'Server', 'Username' => 'Benutzer', 'Password' => 'Passwort', diff --git a/adminer/lang/el.inc.php b/adminer/lang/el.inc.php index 1a4958f3..1b40fb61 100644 --- a/adminer/lang/el.inc.php +++ b/adminer/lang/el.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Αποσύνδεση', 'Logged as: %s' => 'Συνδεθήκατε ως %s', 'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.', - 'Invalid credentials.' => 'Εσφαλμένα Διαπιστευτήρια.', + 'Invalid server or credentials.' => null, 'Too many unsuccessful logins, try again in %d minute(s).' => array('Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτό.', 'Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτά.'), 'Master password expired. Implement %s method to make it permanent.' => 'Έληξε ο Κύριος Κωδικός. Ενεργοποιήστε τη μέθοδο %s για να τον κάνετε μόνιμο.', 'Language' => 'Γλώσσα', diff --git a/adminer/lang/es.inc.php b/adminer/lang/es.inc.php index 9b2d9b07..9603518e 100644 --- a/adminer/lang/es.inc.php +++ b/adminer/lang/es.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Login', 'Logout successful.' => 'Sesión finalizada con éxito.', - 'Invalid credentials.' => 'Usuario y/o clave de acceso incorrecta.', + 'Invalid server or credentials.' => null, 'Server' => 'Servidor', 'Username' => 'Usuario', 'Password' => 'Contraseña', diff --git a/adminer/lang/et.inc.php b/adminer/lang/et.inc.php index 25bc02a7..7e961c87 100644 --- a/adminer/lang/et.inc.php +++ b/adminer/lang/et.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Logi sisse', 'Logout successful.' => 'Väljalogimine õnnestus.', - 'Invalid credentials.' => 'Ebakorrektsed andmed.', + 'Invalid server or credentials.' => null, 'Server' => 'Server', 'Username' => 'Kasutajanimi', 'Password' => 'Parool', diff --git a/adminer/lang/fa.inc.php b/adminer/lang/fa.inc.php index f96580d3..909aa95b 100644 --- a/adminer/lang/fa.inc.php +++ b/adminer/lang/fa.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'خروج', 'Logged as: %s' => 'ورود به عنوان: %s', 'Logout successful.' => 'با موفقیت خارج شدید.', - 'Invalid credentials.' => 'اعتبار سنجی نامعتبر.', + 'Invalid server or credentials.' => null, 'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'), 'Master password expired. Implement %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را پیاده سازی کرده تا آن را دائمی سازید.', 'Language' => 'زبان', diff --git a/adminer/lang/fi.inc.php b/adminer/lang/fi.inc.php index b658e590..2d96fe6f 100644 --- a/adminer/lang/fi.inc.php +++ b/adminer/lang/fi.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Kirjaudu ulos', 'Logged as: %s' => 'Olet kirjautunut käyttäjänä: %s', 'Logout successful.' => 'Uloskirjautuminen onnistui.', - 'Invalid credentials.' => 'Virheelliset kirjautumistiedot.', + 'Invalid server or credentials.' => null, 'Too many unsuccessful logins, try again in %d minute(s).' => array('Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.', 'Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.'), 'Master password expired. Implement %s method to make it permanent.' => 'Master-salasana ei ole enää voimassa. Toteuta %s-metodi sen tekemiseksi pysyväksi.', 'Language' => 'Kieli', diff --git a/adminer/lang/fr.inc.php b/adminer/lang/fr.inc.php index 7afbd869..576418f5 100644 --- a/adminer/lang/fr.inc.php +++ b/adminer/lang/fr.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Authentification', 'Logout successful.' => 'Au revoir !', - 'Invalid credentials.' => 'Authentification échouée.', + 'Invalid server or credentials.' => null, 'Server' => 'Serveur', 'Username' => 'Utilisateur', 'Password' => 'Mot de passe', diff --git a/adminer/lang/gl.inc.php b/adminer/lang/gl.inc.php index 1a6ca805..e1e9bcda 100644 --- a/adminer/lang/gl.inc.php +++ b/adminer/lang/gl.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Conectar', 'Logout successful.' => 'Pechouse a sesión con éxito.', - 'Invalid credentials.' => 'Credenciais (usuario e/ou contrasinal) inválidos.', + 'Invalid server or credentials.' => null, 'Server' => 'Servidor', 'Username' => 'Usuario', 'Password' => 'Contrasinal', diff --git a/adminer/lang/he.inc.php b/adminer/lang/he.inc.php index cdc531c1..810f60ba 100644 --- a/adminer/lang/he.inc.php +++ b/adminer/lang/he.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'התחברות', 'Logout successful.' => 'ההתחברות הצליחה', - 'Invalid credentials.' => 'פרטי התחברות שגויים', + 'Invalid server or credentials.' => null, 'Server' => 'שרת', 'Username' => 'שם משתמש', 'Password' => 'סיסמה', diff --git a/adminer/lang/hu.inc.php b/adminer/lang/hu.inc.php index ae121983..ad2285e4 100644 --- a/adminer/lang/hu.inc.php +++ b/adminer/lang/hu.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Belépés', 'Logout successful.' => 'Sikeres kilépés.', - 'Invalid credentials.' => 'Érvénytelen adatok.', + 'Invalid server or credentials.' => null, 'Server' => 'Szerver', 'Username' => 'Felhasználó', 'Password' => 'Jelszó', diff --git a/adminer/lang/id.inc.php b/adminer/lang/id.inc.php index b8103e28..4c88cfad 100644 --- a/adminer/lang/id.inc.php +++ b/adminer/lang/id.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Keluar', 'Logged as: %s' => 'Masuk sebagai: %s', 'Logout successful.' => 'Berhasil keluar.', - 'Invalid credentials.' => 'Akses tidak sah.', + 'Invalid server or credentials.' => null, 'Language' => 'Bahasa', 'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.', 'No extension' => 'Ekstensi tidak ada', diff --git a/adminer/lang/it.inc.php b/adminer/lang/it.inc.php index edbeac4b..ac47b404 100644 --- a/adminer/lang/it.inc.php +++ b/adminer/lang/it.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Autenticazione', 'Logout successful.' => 'Uscita effettuata con successo.', - 'Invalid credentials.' => 'Credenziali non valide.', + 'Invalid server or credentials.' => 'Server o credenziali non valide.', 'Server' => 'Server', 'Username' => 'Utente', 'Password' => 'Password', diff --git a/adminer/lang/ja.inc.php b/adminer/lang/ja.inc.php index 367bfc2f..e6e70fd2 100644 --- a/adminer/lang/ja.inc.php +++ b/adminer/lang/ja.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'ログイン', 'Logout successful.' => 'ログアウト', - 'Invalid credentials.' => '不正なログイン', + 'Invalid server or credentials.' => null, 'Server' => 'サーバ', 'Username' => 'ユーザ名', 'Password' => 'パスワード', diff --git a/adminer/lang/ka.inc.php b/adminer/lang/ka.inc.php index dc765cb3..c546137b 100644 --- a/adminer/lang/ka.inc.php +++ b/adminer/lang/ka.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'შესვლა', 'Logout successful.' => 'გამოხვედით სისტემიდან.', - 'Invalid credentials.' => 'არასწორი მომხმარებელი ან პაროლი.', + 'Invalid server or credentials.' => null, 'Server' => 'სერვერი', 'Username' => 'მომხმარებელი', 'Password' => 'პაროლი', diff --git a/adminer/lang/ko.inc.php b/adminer/lang/ko.inc.php index a5df2e4b..9a8c1e88 100644 --- a/adminer/lang/ko.inc.php +++ b/adminer/lang/ko.inc.php @@ -121,7 +121,7 @@ $translations = array( 'Indexes have been altered.' => '색인을 변경했습니다.', 'Indexes' => '색인', 'Insert' => '삽입', - 'Invalid credentials.' => '잘못된 로그인', + 'Invalid server or credentials.' => null, 'Invalid CSRF token. Send the form again.' => '잘못된 CSRF 토큰입니다. 다시 보내주십시오.', 'Invalid database.' => '잘못된 데이터베이스입니다.', 'Invalid schema.' => '잘못된 스키마입니다.', diff --git a/adminer/lang/lt.inc.php b/adminer/lang/lt.inc.php index 6989f7b9..0d81ba37 100644 --- a/adminer/lang/lt.inc.php +++ b/adminer/lang/lt.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Atsijungti', 'Logged as: %s' => 'Prisijungęs kaip: %s', 'Logout successful.' => 'Jūs atsijungėte nuo sistemos.', - 'Invalid credentials.' => 'Neteisingi prisijungimo duomenys.', + 'Invalid server or credentials.' => null, 'Language' => 'Kalba', 'Invalid CSRF token. Send the form again.' => 'Neteisingas CSRF tokenas. Bandykite siųsti formos duomenis dar kartą.', 'No extension' => 'Nėra plėtiio', diff --git a/adminer/lang/lv.inc.php b/adminer/lang/lv.inc.php index 8f1858fc..59e43cc5 100644 --- a/adminer/lang/lv.inc.php +++ b/adminer/lang/lv.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Ieiet', 'Logout successful.' => 'Jūs veiksmīgi izgājāt no sistēmas.', - 'Invalid credentials.' => 'Nepareizs lietotāja vārds vai parole.', + 'Invalid server or credentials.' => null, 'Server' => 'Serveris', 'Username' => 'Lietotājs', 'Password' => 'Parole', diff --git a/adminer/lang/ms.inc.php b/adminer/lang/ms.inc.php index 746cb35e..f5e6a25a 100644 --- a/adminer/lang/ms.inc.php +++ b/adminer/lang/ms.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => 'Log masuk sebagai: %s', 'Logout successful.' => 'Log keluar berjaya.', 'Thanks for using Adminer, consider donating.' => 'Terima kasih kerana menggunakan Adminer, pertimbangkan untuk menderma.', - 'Invalid credentials.' => 'Akses tidak sah.', + 'Invalid server or credentials.' => null, 'Too many unsuccessful logins, try again in %d minute(s).' => 'Terlalu banyak percubaan log masuk yang gagal, sila cuba lagi dalam masa %d minit.', 'Master password expired. Implement %s method to make it permanent.' => 'Kata laluan utama telah luput. Gunakan cara %s untuk mengekalkannya.', 'Language' => 'Bahasa', diff --git a/adminer/lang/nl.inc.php b/adminer/lang/nl.inc.php index fa37f1c0..cc5f4f3c 100644 --- a/adminer/lang/nl.inc.php +++ b/adminer/lang/nl.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Aanmelden', 'Logout successful.' => 'Successvol afgemeld.', - 'Invalid credentials.' => 'Ongeldige gebruikersgegevens.', + 'Invalid server or credentials.' => null, 'Server' => 'Server', 'Username' => 'Gebruikersnaam', 'Password' => 'Wachtwoord', diff --git a/adminer/lang/no.inc.php b/adminer/lang/no.inc.php index bdb328f7..55ed1f1b 100644 --- a/adminer/lang/no.inc.php +++ b/adminer/lang/no.inc.php @@ -9,7 +9,7 @@ $translations = array( 'Logout' => 'Logg ut', 'Logged as: %s' => 'Logget inn som: %s', 'Logout successful.' => 'Utlogging vellykket.', - 'Invalid credentials.' => 'Ugylding innloggingsinformasjon.', + 'Invalid server or credentials.' => null, 'Master password expired. Implement %s method to make it permanent.' => 'Master-passord er utløpt. Implementer en metode for %s for å gjøre det permanent.', 'Language' => 'Språk', 'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.', diff --git a/adminer/lang/pl.inc.php b/adminer/lang/pl.inc.php index 55f8a3f5..868fbc20 100644 --- a/adminer/lang/pl.inc.php +++ b/adminer/lang/pl.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => 'Zalogowany jako: %s', 'Logout successful.' => 'Wylogowano pomyślnie.', 'Thanks for using Adminer, consider donating.' => 'Dziękujemy za używanie Adminera, rozważ proszę dotację.', - 'Invalid credentials.' => 'Nieprawidłowe dane logowania.', + 'Invalid server or credentials.' => 'Nieprawidłowy serwer lub dane logowania.', 'Too many unsuccessful logins, try again in %d minute(s).' => array('Za dużo nieudanych prób logowania, spróbuj ponownie za %d minutę.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minuty.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minut.'), 'Master password expired. Implement %s method to make it permanent.' => 'Ważność hasła głównego wygasła. Zaimplementuj własną metodę %s, aby ustawić je na stałe.', 'Language' => 'Język', diff --git a/adminer/lang/pt-br.inc.php b/adminer/lang/pt-br.inc.php index 77202802..844d5580 100644 --- a/adminer/lang/pt-br.inc.php +++ b/adminer/lang/pt-br.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Entrar', 'Logout successful.' => 'Saída bem sucedida.', - 'Invalid credentials.' => 'Identificação inválida.', + 'Invalid server or credentials.' => null, 'Server' => 'Servidor', 'Username' => 'Usuário', 'Password' => 'Senha', diff --git a/adminer/lang/pt.inc.php b/adminer/lang/pt.inc.php index 950a36e9..4f098b34 100644 --- a/adminer/lang/pt.inc.php +++ b/adminer/lang/pt.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Entrar', 'Logout successful.' => 'Sessão terminada com sucesso.', - 'Invalid credentials.' => 'Identificação inválida.', + 'Invalid server or credentials.' => null, 'Server' => 'Servidor', 'Username' => 'Nome de utilizador', 'Password' => 'Senha', diff --git a/adminer/lang/ro.inc.php b/adminer/lang/ro.inc.php index c2e789c7..24ec39e4 100644 --- a/adminer/lang/ro.inc.php +++ b/adminer/lang/ro.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Intră', 'Logout successful.' => 'Ați ieșit cu succes.', - 'Invalid credentials.' => 'Numele de utilizator sau parola este greșită.', + 'Invalid server or credentials.' => null, 'Server' => 'Server', 'Username' => 'Nume de utilizator', 'Password' => 'Parola', diff --git a/adminer/lang/ru.inc.php b/adminer/lang/ru.inc.php index 6826c375..1368628a 100644 --- a/adminer/lang/ru.inc.php +++ b/adminer/lang/ru.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Войти', 'Logout successful.' => 'Вы успешно покинули систему.', - 'Invalid credentials.' => 'Неправильное имя пользователя или пароль.', + 'Invalid server or credentials.' => null, 'Server' => 'Сервер', 'Username' => 'Имя пользователя', 'Password' => 'Пароль', diff --git a/adminer/lang/sk.inc.php b/adminer/lang/sk.inc.php index 61ca8138..9ee3383a 100644 --- a/adminer/lang/sk.inc.php +++ b/adminer/lang/sk.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'Prihlásiť sa', 'Logout successful.' => 'Odhlásenie prebehlo v poriadku.', - 'Invalid credentials.' => 'Neplatné prihlasovacie údaje.', + 'Invalid server or credentials.' => 'Neplatný server alebo prihlasovacie údaje.', 'Server' => 'Server', 'Username' => 'Používateľ', 'Password' => 'Heslo', diff --git a/adminer/lang/sl.inc.php b/adminer/lang/sl.inc.php index a28a0994..c88c7833 100644 --- a/adminer/lang/sl.inc.php +++ b/adminer/lang/sl.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Odjavi se', 'Logged as: %s' => 'Prijavljen kot: %s', 'Logout successful.' => 'Prijava uspešna.', - 'Invalid credentials.' => 'Neveljavne pravice.', + 'Invalid server or credentials.' => 'Neveljaven strežnik ali pravice.', 'Language' => 'Jezik', 'Invalid CSRF token. Send the form again.' => 'Neveljaven token CSRF. Pošljite formular še enkrat.', 'No extension' => 'Brez dodatkov', diff --git a/adminer/lang/sr.inc.php b/adminer/lang/sr.inc.php index 38d08810..e74884c6 100644 --- a/adminer/lang/sr.inc.php +++ b/adminer/lang/sr.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Одјава', 'Logged as: %s' => 'Пријави се као: %s', 'Logout successful.' => 'Успешна одјава.', - 'Invalid credentials.' => 'Неважеће дозволе.', + 'Invalid server or credentials.' => null, 'Language' => 'Језик', 'Invalid CSRF token. Send the form again.' => 'Неважећи CSRF код. Проследите поново форму.', 'No extension' => 'Без додатака', diff --git a/adminer/lang/sv.inc.php b/adminer/lang/sv.inc.php index cd1819c0..1849a9d0 100644 --- a/adminer/lang/sv.inc.php +++ b/adminer/lang/sv.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => 'Inloggad som: %s', 'Logout successful.' => 'Du är nu utloggad.', 'Thanks for using Adminer, consider donating.' => 'Tack för att du använder Adminer, vänligen fundera över att donera.', - 'Invalid credentials.' => 'Ogiltiga inloggningsuppgifter.', + 'Invalid server or credentials.' => null, 'There is a space in the input password which might be the cause.' => 'Det finns ett mellanslag i lösenordet, vilket kan vara anledningen.', 'Adminer does not support accessing a database without a password, more information.' => 'Adminer tillåter inte att ansluta till en databas utan lösenord. Mer information.', 'Database does not support password.' => 'Databasen stödjer inte lösenord.', diff --git a/adminer/lang/ta.inc.php b/adminer/lang/ta.inc.php index 259df634..6315aba7 100644 --- a/adminer/lang/ta.inc.php +++ b/adminer/lang/ta.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'நுழை', 'Logout successful.' => 'வெற்றிக‌ர‌மாய் வெளியேறியாயிற்று.', - 'Invalid credentials.' => 'ச‌ரியான‌ விப‌ர‌ங்க‌ள் இல்லை.', + 'Invalid server or credentials.' => null, 'Server' => 'வ‌ழ‌ங்கி (Server)', 'Username' => 'ப‌ய‌னாள‌ர் (User)', 'Password' => 'க‌ட‌வுச்சொல்', diff --git a/adminer/lang/th.inc.php b/adminer/lang/th.inc.php index d8fcebbc..9477782d 100644 --- a/adminer/lang/th.inc.php +++ b/adminer/lang/th.inc.php @@ -2,7 +2,7 @@ $translations = array( 'Login' => 'เข้าสู่ระบบ', 'Logout successful.' => 'ออกจากระบบเรียบร้อยแล้ว.', - 'Invalid credentials.' => 'ข้อมูลไม่ถูกต้อง.', + 'Invalid server or credentials.' => null, 'Server' => 'เซอเวอร์', 'Username' => 'ชื่อผู้ใช้งาน', 'Password' => 'รหัสผ่าน', diff --git a/adminer/lang/tr.inc.php b/adminer/lang/tr.inc.php index f0bed0f3..6f746712 100644 --- a/adminer/lang/tr.inc.php +++ b/adminer/lang/tr.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => '%s olarak giriş yapıldı.', 'Logout successful.' => 'Oturum başarıyla sonlandı.', 'Thanks for using Adminer, consider donating.' => 'Adminer kullandığınız için teşekkür ederiz bağış yapmayı düşünün.', - 'Invalid credentials.' => 'Geçersiz kimlik bilgileri.', + 'Invalid server or credentials.' => null, 'Too many unsuccessful logins, try again in %d minute(s).' => array('Çok fazla oturum açma denemesi yapıldı.', '%d Dakika sonra tekrar deneyiniz.'), 'Master password expired. Implement %s method to make it permanent.' => 'Ana şifrenin süresi doldu. Kalıcı olması için %s medodunu kullanın.', 'Language' => 'Dil', diff --git a/adminer/lang/uk.inc.php b/adminer/lang/uk.inc.php index 33551d61..f6191004 100644 --- a/adminer/lang/uk.inc.php +++ b/adminer/lang/uk.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Вийти', 'Logged as: %s' => 'Ви увійшли як: %s', 'Logout successful.' => 'Ви вдало вийшли з системи.', - 'Invalid credentials.' => 'Неправильні дані входу.', + 'Invalid server or credentials.' => null, 'Language' => 'Мова', 'Invalid CSRF token. Send the form again.' => 'Недійсний CSRF токен. Надішліть форму ще раз.', 'No extension' => 'Нема розширень', diff --git a/adminer/lang/vi.inc.php b/adminer/lang/vi.inc.php index b1a0a812..7953a6e1 100644 --- a/adminer/lang/vi.inc.php +++ b/adminer/lang/vi.inc.php @@ -10,7 +10,7 @@ $translations = array( 'Logout' => 'Thoát', 'Logged as: %s' => 'Vào dưới tên: %s', 'Logout successful.' => 'Đã thoát xong.', - 'Invalid credentials.' => 'Tài khoản sai.', + 'Invalid server or credentials.' => null, 'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.', 'Master password expired. Implement %s method to make it permanent.' => 'Mật khẩu đã hết hạn. Thử cách làm để giữ cố định.', 'Language' => 'Ngôn ngữ', diff --git a/adminer/lang/xx.inc.php b/adminer/lang/xx.inc.php index f8f1af49..37f9e20a 100644 --- a/adminer/lang/xx.inc.php +++ b/adminer/lang/xx.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => 'Xx: %s', 'Logout successful.' => 'Xx.', 'Thanks for using Adminer, consider donating.' => 'Xx xx.', - 'Invalid credentials.' => 'Xx.', + 'Invalid server or credentials.' => 'Xx.', 'There is a space in the input password which might be the cause.' => 'Xx.', 'Adminer does not support accessing a database without a password, more information.' => 'Xx, xx.', 'Database does not support password.' => 'Xx.', diff --git a/adminer/lang/zh-tw.inc.php b/adminer/lang/zh-tw.inc.php index b9e79b8b..579e4c4b 100644 --- a/adminer/lang/zh-tw.inc.php +++ b/adminer/lang/zh-tw.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => '登錄為: %s', 'Logout successful.' => '成功登出。', 'Thanks for using Adminer, consider donating.' => '感謝使用Adminer,請考慮為我們捐款(英文網頁).', - 'Invalid credentials.' => '無效的憑證。', + 'Invalid server or credentials.' => null, 'There is a space in the input password which might be the cause.' => '您輸入的密碼中有一個空格,這可能是導致問題的原因。', 'Adminer does not support accessing a database without a password, more information.' => 'Adminer預設不支援訪問沒有密碼的資料庫,詳情見這裡.', 'Database does not support password.' => '資料庫不支援密碼。', diff --git a/adminer/lang/zh.inc.php b/adminer/lang/zh.inc.php index c2206fe8..f746f4ac 100644 --- a/adminer/lang/zh.inc.php +++ b/adminer/lang/zh.inc.php @@ -11,7 +11,7 @@ $translations = array( 'Logged as: %s' => '登录用户:%s', 'Logout successful.' => '成功登出。', 'Thanks for using Adminer, consider donating.' => '感谢使用Adminer,请考虑为我们捐款(英文页面).', - 'Invalid credentials.' => '无效凭据。', + 'Invalid server or credentials.' => null, 'There is a space in the input password which might be the cause.' => '您输入的密码中有一个空格,这可能是导致问题的原因。', 'Adminer does not support accessing a database without a password, more information.' => 'Adminer默认不支持访问没有密码的数据库,详情见这里.', 'Database does not support password.' => '数据库不支持密码。', diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php index 2e1d95c4..ff9eb688 100644 --- a/plugins/drivers/clickhouse.php +++ b/plugins/drivers/clickhouse.php @@ -25,7 +25,7 @@ if (isset($_GET["clickhouse"])) { )))); if ($file === false) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } @@ -37,7 +37,7 @@ if (isset($_GET["clickhouse"])) { } } - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } @@ -47,12 +47,12 @@ if (isset($_GET["clickhouse"])) { $return = json_decode($file, true); if ($return === null) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } if (!isset($return['rows']) || !isset($return['data']) || !isset($return['meta'])) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } diff --git a/plugins/drivers/simpledb.php b/plugins/drivers/simpledb.php index 5264cce2..5decfd5b 100644 --- a/plugins/drivers/simpledb.php +++ b/plugins/drivers/simpledb.php @@ -15,7 +15,7 @@ if (isset($_GET["simpledb"])) { */ function connect($server, $password) { if ($server == '' || $password == '') { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } @@ -24,7 +24,7 @@ if (isset($_GET["simpledb"])) { if (!$parts || !isset($parts['host']) || !preg_match('~^sdb\.([a-z0-9-]+\.)?amazonaws\.com$~i', $parts['host']) || isset($parts['port']) ) { - $this->error = lang('Invalid credentials.'); + $this->error = lang('Invalid server or credentials.'); return false; } From 38e4b51256751dd0028fffdf35bc7e5af223aee4 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Sat, 16 Mar 2024 19:11:38 +0100 Subject: [PATCH 6/6] Update changes.txt --- changes.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changes.txt b/changes.txt index d10d7f4b..f1ffc5e4 100644 --- a/changes.txt +++ b/changes.txt @@ -1,3 +1,7 @@ +Adminer 4.9.0-dev: +- Validate server input in login form. +- Validate connection to server in HTTP based drivers. + Adminer 4.8.2 (released 2024-03-16): Support multi-line table comments MySQL: Use ST_SRID() instead of SRID() for MySQL 8 (PR #418)