diff options
author | Michal Čihař <michal@cihar.com> | 2017-03-27 16:55:35 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-03-27 17:23:01 +0300 |
commit | b6ca92cc75c8a16001425be7881e73430bcc35b8 (patch) | |
tree | c4cf45d13807b1a90dc037e7093da55081d69792 /libraries | |
parent | 1f859b1b156db3c4b59097272841271f628e7b91 (diff) |
Truncate only long passwords
This avoids problems with certain PHP versions returning false when
first parameter to substr is ''.
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/common.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/common.inc.php b/libraries/common.inc.php index fad7f0380d..be5c9c45ec 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -868,7 +868,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { . ' ' . $cfg['Server']['auth_type'] ); } - if (isset($_REQUEST['pma_password'])) { + if (isset($_REQUEST['pma_password']) && strlen($_REQUEST['pma_password']) > 256) { $_REQUEST['pma_password'] = substr($_REQUEST['pma_password'], 0, 256); } include_once './libraries/plugins/auth/' . $auth_class . '.class.php'; |