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

Fix printing error message while validating server URL

This commit is contained in:
Peter Knut
2024-10-28 20:57:18 +01:00
parent 0519a0b985
commit 87fc82f88e

View File

@@ -71,7 +71,7 @@ if (!function_exists('is_server_host_valid')) {
*/
function build_http_url($server, $username, $password, $defaultServer, $defaultPort = null) {
if (!preg_match('~^(https?://)?([^:]*)(:\d+)?$~', rtrim($server, '/'), $matches)) {
$this->error = lang('Invalid server or credentials.');
auth_error(lang('Invalid server or credentials.'));
return false;
}