Move password truncation to AuthenticationCookie
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
65f6fc3c6e
commit
8c3536bce1
@ -331,7 +331,13 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
|
||||
// The user just logged in
|
||||
$this->user = Core::sanitizeMySQLUser($_POST['pma_username']);
|
||||
$this->password = $_POST['pma_password'] ?? '';
|
||||
|
||||
$password = $_POST['pma_password'] ?? '';
|
||||
if (strlen($password) > 256) {
|
||||
$password = substr($password, 0, 256);
|
||||
}
|
||||
$this->password = $password;
|
||||
|
||||
if ($GLOBALS['cfg']['AllowArbitraryServer']
|
||||
&& isset($_REQUEST['pma_servername'])
|
||||
) {
|
||||
|
||||
@ -264,10 +264,6 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
}
|
||||
unset($cache_key);
|
||||
|
||||
if (isset($_POST['pma_password']) && strlen($_POST['pma_password']) > 256) {
|
||||
$_POST['pma_password'] = substr($_POST['pma_password'], 0, 256);
|
||||
}
|
||||
|
||||
$auth_plugin = Plugins::getAuthPlugin();
|
||||
$auth_plugin->authenticate();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user