From cea9aa968871715ad5e57bb43d4babda95fda2a6 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Fri, 6 Mar 2015 18:20:35 +0530 Subject: [PATCH 1/5] Revert c9c280e9921d and b39933c37b8c Signed-off-by: Atul Pratap Singh --- js/makegrid.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/makegrid.js b/js/makegrid.js index 0934841e8a..6ec43bf73f 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -1026,11 +1026,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $input_field.datepicker("show"); - var datepicker_top = parseInt(document.getElementById("ui-datepicker-div").style.getPropertyValue("top"), 10); + //move ui-datepicker-div inside cEdit div + var datepicker_div = $('#ui-datepicker-div'); + datepicker_div.css({'top': 0, 'left': 0, 'position': 'relative'}); + $('.cEdit').append(datepicker_div); - if (datepicker_top > 370 && !is_null) { - document.getElementById("ui-datepicker-div").style.marginTop = "30px"; - } + var edit_area_top = $('#ui-datepicker-div').height()+32; + $('.edit_area').css({'top' : edit_area_top+'px', 'position': 'absolute'}); if (is_null){ $(g.cEdit).find('.edit_area').hide(); From 42bbc5e04d507bd8e864d04c69f68499755b32ef Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 9 Mar 2015 13:24:28 +0530 Subject: [PATCH 2/5] bug #4758 Firefox with auth_type to http with multiple server doesn't work anymore Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + .../plugins/auth/AuthenticationHttp.class.php | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fed642696e..63f974e1f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog - bug #4788 Inline edit of DATE fields with NULL, NULL checkbox is under datepicker - bug #4790 DROP TABLE/VIEW IF EXISTS are not tracked - bug Compatibility with central columns of version 4.4 +- bug #4758 Firefox with auth_type to http with multiple server doesn't work anymore 4.3.11.1 (2015-03-04) - bug [security] Risk of BREACH attack, see PMASA-2015-1 diff --git a/libraries/plugins/auth/AuthenticationHttp.class.php b/libraries/plugins/auth/AuthenticationHttp.class.php index 2b2fe7e0cd..3e3c6db99c 100644 --- a/libraries/plugins/auth/AuthenticationHttp.class.php +++ b/libraries/plugins/auth/AuthenticationHttp.class.php @@ -22,7 +22,7 @@ require_once 'libraries/plugins/AuthenticationPlugin.class.php'; class AuthenticationHttp extends AuthenticationPlugin { /** - * Displays authentication form + * Displays authentication form and redirect as necessary * * @global string the font face to use in case of failure * @global string the default font size to use in case of failure @@ -44,6 +44,16 @@ class AuthenticationHttp extends AuthenticationPlugin } } + $this->authForm(); + } + + /** + * Displays authentication form + * + * @return boolean + */ + private function authForm() + { /* Perform logout to custom URL */ if (! empty($_REQUEST['old_usr']) && ! empty($GLOBALS['cfg']['Server']['LogoutURL']) @@ -261,7 +271,7 @@ class AuthenticationHttp extends AuthenticationPlugin if ($error && $GLOBALS['errno'] != 1045) { PMA_fatalError($error); } else { - $this->auth(); + $this->authForm(); return true; } } From df39cff9ef9eff98b03185204d55920b9882a0dc Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 9 Mar 2015 13:53:12 +0530 Subject: [PATCH 3/5] Return value from the new method Signed-off-by: Madhura Jayaratne --- libraries/plugins/auth/AuthenticationHttp.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/plugins/auth/AuthenticationHttp.class.php b/libraries/plugins/auth/AuthenticationHttp.class.php index 3e3c6db99c..6654357b00 100644 --- a/libraries/plugins/auth/AuthenticationHttp.class.php +++ b/libraries/plugins/auth/AuthenticationHttp.class.php @@ -44,7 +44,7 @@ class AuthenticationHttp extends AuthenticationPlugin } } - $this->authForm(); + return $this->authForm(); } /** From 1f630a1a97b7fc3a15ff344bd5e9cb60826f5577 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 9 Mar 2015 14:02:34 +0530 Subject: [PATCH 4/5] Update tests Signed-off-by: Madhura Jayaratne --- test/classes/plugin/auth/PMA_AuthenticationHttp_test.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/classes/plugin/auth/PMA_AuthenticationHttp_test.php b/test/classes/plugin/auth/PMA_AuthenticationHttp_test.php index e898d7713f..92136ac42e 100644 --- a/test/classes/plugin/auth/PMA_AuthenticationHttp_test.php +++ b/test/classes/plugin/auth/PMA_AuthenticationHttp_test.php @@ -451,12 +451,13 @@ class PMA_AuthenticationHttp_Test extends PHPUnit_Framework_TestCase $this->object = $this->getMockBuilder('AuthenticationHttp') ->disableOriginalConstructor() - ->setMethods(array('auth')) + ->setMethods(array('authForm')) ->getMock(); $this->object->expects($this->exactly(2)) - ->method('auth'); + ->method('authForm'); // case 2 + $GLOBALS['cfg']['Server']['host'] = 'host'; $GLOBALS['errno'] = 1045; $this->assertTrue( From 7dde05cc4188db5477eec0e872db047110856b1b Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 9 Mar 2015 14:17:15 +0530 Subject: [PATCH 5/5] phpUnit is unable to mock private methods Signed-off-by: Madhura Jayaratne --- libraries/plugins/auth/AuthenticationHttp.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/plugins/auth/AuthenticationHttp.class.php b/libraries/plugins/auth/AuthenticationHttp.class.php index 6654357b00..856fd079e4 100644 --- a/libraries/plugins/auth/AuthenticationHttp.class.php +++ b/libraries/plugins/auth/AuthenticationHttp.class.php @@ -52,7 +52,7 @@ class AuthenticationHttp extends AuthenticationPlugin * * @return boolean */ - private function authForm() + public function authForm() { /* Perform logout to custom URL */ if (! empty($_REQUEST['old_usr'])