bug #4611 [security] DOS attack with long passwords

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
Madhura Jayaratne 2014-12-02 21:20:59 +05:30
parent 9b2479b721
commit 1ac863c757
4 changed files with 25 additions and 0 deletions

View File

@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog
4.2.13.1 (not yet released)
- bug #4612 [security] XSS vulnerability in redirection mechanism
- bug #4611 [security] DOS attack with long passwords
4.2.13.0 (2014-11-30)
- bug #4604 Query history not being deleted

View File

@ -859,6 +859,9 @@ if (! defined('PMA_MINIMUM_COMMON')) {
. ' ' . $cfg['Server']['auth_type']
);
}
if (isset($_REQUEST['pma_password'])) {
$_REQUEST['pma_password'] = substr($_REQUEST['pma_password'], 0, 256);
}
include_once './libraries/plugins/auth/' . $auth_class . '.class.php';
// todo: add plugin manager
$plugin_manager = null;
@ -988,6 +991,8 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$controllink = $userlink;
}
$auth_plugin->storeUserCredentials();
/* Log success */
PMA_logUser($cfg['Server']['user']);

View File

@ -41,6 +41,15 @@ abstract class AuthenticationPlugin extends PluginObserver
*/
abstract public function authSetUser();
/**
* Stores user credentials after successful login.
*
* @return void
*/
public function storeUserCredentials()
{
}
/**
* User is not allowed to login to MySQL -> authentication failed
*

View File

@ -557,6 +557,16 @@ class AuthenticationCookie extends AuthenticationPlugin
unset($_SERVER['PHP_AUTH_PW']);
$_SESSION['last_access_time'] = time();
}
/**
* Stores user credentials after successful login.
*
* @return void
*/
public function storeUserCredentials()
{
global $cfg;
$this->createBlowfishIV();