Pull-request: #18123 Ref: #16451 Ref: #16452 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
a8bfc4ceea
@ -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;
|
||||
}
|
||||
|
||||
@ -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),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user