mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Warn when using password with leading or trailing spaces
This commit is contained in:
@@ -172,7 +172,8 @@ if (isset($_GET["username"])) {
|
||||
|
||||
$login = null;
|
||||
if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
|
||||
auth_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 credentials.')));
|
||||
auth_error($error . (preg_match('~^ | $~', get_password()) ? '<br>' . lang('There is a space in the input password which might be the cause.') : ''));
|
||||
}
|
||||
|
||||
if ($auth && $_POST["token"]) {
|
||||
|
Reference in New Issue
Block a user