diff --git a/libraries/classes/Plugins/Auth/AuthenticationCookie.php b/libraries/classes/Plugins/Auth/AuthenticationCookie.php index e083ddf19a..db895a6508 100644 --- a/libraries/classes/Plugins/Auth/AuthenticationCookie.php +++ b/libraries/classes/Plugins/Auth/AuthenticationCookie.php @@ -297,9 +297,9 @@ class AuthenticationCookie extends AuthenticationPlugin $this->user = Core::sanitizeMySQLUser($_POST['pma_username']); $password = $_POST['pma_password'] ?? ''; - if (strlen($password) >= 1000) { + if (strlen($password) >= 2000) { $conn_error = __('Your password is too long. To prevent denial-of-service attacks, ' . - 'phpMyAdmin restricts passwords to less than 1000 characters.'); + 'phpMyAdmin restricts passwords to less than 2000 characters.'); return false; } diff --git a/test/classes/Plugins/Auth/AuthenticationCookieTest.php b/test/classes/Plugins/Auth/AuthenticationCookieTest.php index b1c8379ab5..034138a9cd 100644 --- a/test/classes/Plugins/Auth/AuthenticationCookieTest.php +++ b/test/classes/Plugins/Auth/AuthenticationCookieTest.php @@ -749,22 +749,16 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase { return [ [ - str_repeat('a', 1000), + str_repeat('a', 2001), false, 'Your password is too long. To prevent denial-of-service attacks,' - . ' phpMyAdmin restricts passwords to less than 1000 characters.', - ], - [ - str_repeat('a', 1001), - false, - 'Your password is too long. To prevent denial-of-service attacks,' - . ' phpMyAdmin restricts passwords to less than 1000 characters.', + . ' phpMyAdmin restricts passwords to less than 2000 characters.', ], [ str_repeat('a', 3000), false, 'Your password is too long. To prevent denial-of-service attacks,' - . ' phpMyAdmin restricts passwords to less than 1000 characters.', + . ' phpMyAdmin restricts passwords to less than 2000 characters.', ], [ str_repeat('a', 256),