Merge remote-tracking branch 'origin/QA_4_3' into QA_4_3
This commit is contained in:
commit
28d163f02c
@ -75,6 +75,10 @@ phpMyAdmin - ChangeLog
|
||||
+ rfe #1537 PHP OpenSSL support for cookie encryption/decryption
|
||||
- bug #4227 Token mismatch when using HTTP AUTH and the SESSION expires
|
||||
|
||||
4.2.13.1 (2014-12-03)
|
||||
- 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
|
||||
- bug #4057 db/table query string parameters no longer work
|
||||
|
||||
@ -860,6 +860,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']);
|
||||
|
||||
|
||||
@ -38,6 +38,15 @@ abstract class AuthenticationPlugin
|
||||
*/
|
||||
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
|
||||
*
|
||||
|
||||
@ -560,6 +560,16 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
} else {
|
||||
$_SESSION['last_access_time'] = time();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores user credentials after successful login.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function storeUserCredentials()
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$this->createIV();
|
||||
|
||||
|
||||
@ -803,13 +803,14 @@ class PMA_AuthenticationCookie_Test extends PHPUnit_Framework_TestCase
|
||||
isset($_SERVER['PHP_AUTH_PW'])
|
||||
);
|
||||
|
||||
$this->assertTrue(
|
||||
isset($_COOKIE['pmaUser-1'])
|
||||
);
|
||||
// todo: Move to a distinct test for storeUserCredentials()
|
||||
//$this->assertTrue(
|
||||
// isset($_COOKIE['pmaUser-1'])
|
||||
//);
|
||||
|
||||
$this->assertTrue(
|
||||
isset($_COOKIE['pmaPass-1'])
|
||||
);
|
||||
//$this->assertTrue(
|
||||
// isset($_COOKIE['pmaPass-1'])
|
||||
//);
|
||||
|
||||
$arr['password'] = 'testPW';
|
||||
$arr['host'] = 'b';
|
||||
|
||||
6
url.php
6
url.php
@ -11,6 +11,10 @@
|
||||
*/
|
||||
define('PMA_MINIMUM_COMMON', true);
|
||||
require_once './libraries/common.inc.php';
|
||||
/**
|
||||
* JavaScript escaping.
|
||||
*/
|
||||
require_once './libraries/js_escape.lib.php';
|
||||
|
||||
if (! PMA_isValid($_GET['url'])
|
||||
|| ! preg_match('/^https?:\/\/[^\n\r]*$/', $_GET['url'])
|
||||
@ -24,7 +28,7 @@ if (! PMA_isValid($_GET['url'])
|
||||
// external site.
|
||||
echo "<script type='text/javascript'>
|
||||
window.onload=function(){
|
||||
window.location='" . htmlspecialchars($_GET['url']) . "';
|
||||
window.location='" . PMA_escapeJsString($_GET['url']) . "';
|
||||
}
|
||||
</script>";
|
||||
// Display redirecting msg on screen.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user