]> git.joonet.de Git - adminer.git/commitdiff
Warn when using password with leading or trailing spaces
authorJakub Vrana <jakub@vrana.cz>
Thu, 13 Sep 2018 14:08:57 +0000 (16:08 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 13 Sep 2018 14:08:57 +0000 (16:08 +0200)
adminer/include/auth.inc.php
adminer/lang/cs.inc.php
adminer/lang/xx.inc.php
changes.txt

index 2e76bf0d8d19af5308c79ee8f0266a2b1ca95f88..fef6b62902b05063a133436be035d413ce4b3457 100644 (file)
@@ -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"]) {
index 52e09e7a84774a9872ed32923846338ffbd01236..c515202d57944aa15f6befd0244e136dd0ccd733 100644 (file)
@@ -12,6 +12,7 @@ $translations = array(
        'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
        'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Díky za použití Admineru, <a href="https://www.adminer.org/cs/donation/">přispějte</a> na vývoj.',
        'Invalid credentials.' => 'Neplatné 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, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer nepodporuje přístup k databázi bez hesla, <a href="https://www.adminer.org/cs/password/"%s>více informací</a>.',
        'Database does not support password.' => 'Databáze nepodporuje heslo.',
        'Too many unsuccessful logins, try again in %d minute(s).' => array('Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minutu.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minuty.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minut.'),
index e9e0940ec442a8fd91fe59549e4cc4423e443ab9..25baa12a39224aa1dd1a990bfb7012f1c9b4a9f0 100644 (file)
@@ -12,6 +12,7 @@ $translations = array(
        'Logout successful.' => 'Xx.',
        'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Xx <a href="https://www.adminer.org/en/donation/">xx</a>.',
        'Invalid 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, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Xx, <a href="https://www.adminer.org/en/password/"%s>xx</a>.',
        'Database does not support password.' => 'Xx.',
        'Too many unsuccessful logins, try again in %d minute(s).' => array('Xx %d.', 'Xx %d.'),
index 1676a5c2636fa80ceba28f3e9b64eeeb0f34ea25..82f0c2428d90d6408e578ee320179bd2bb58284e 100644 (file)
@@ -1,4 +1,5 @@
 Adminer 4.6.4-dev:
+Warn when using password with leading or trailing spaces
 Fix inline editing of empty cells (regression from 4.6.3)
 Allow adding more than two indexes and forign key columns at a time (regression from 4.4.0)
 Fix function change with set data type