]> git.joonet.de Git - adminer.git/commitdiff
Wrap connection error message
authorJakub Vrana <jakub@vrana.cz>
Fri, 21 Feb 2025 13:29:22 +0000 (14:29 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 21 Feb 2025 13:29:22 +0000 (14:29 +0100)
adminer/include/auth.inc.php

index cbf9518c937292def6d98badc07e1fe1a6a6053c..e455c8ee1d9ccc5c596072fd8ed1083d6ecdcfd5 100644 (file)
@@ -166,7 +166,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) ? nl_br(h($connection)) : (is_string($login) ? $login : lang('Invalid credentials.')));
        auth_error($error . (preg_match('~^ | $~', get_password()) ? '<br>' . lang('There is a space in the input password which might be the cause.') : ''));
 }