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

Wrap connection error message

This commit is contained in:
Jakub Vrana
2025-02-21 14:29:22 +01:00
parent 6fe9827eea
commit 1d8bd0a210

View 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.') : ''));
}