@@ -186,7 +186,8 @@ public function testAuth()
186186 $ GLOBALS ['cfg ' ]['Lang ' ] = 'en ' ;
187187 $ GLOBALS ['cfg ' ]['AllowArbitraryServer ' ] = true ;
188188 $ GLOBALS ['cfg ' ]['Servers ' ] = array (1 , 2 );
189- $ _SESSION ['last_valid_captcha ' ] = true ;
189+ $ GLOBALS ['cfg ' ]['CaptchaLoginPrivateKey ' ] = '' ;
190+ $ GLOBALS ['cfg ' ]['CaptchaLoginPublicKey ' ] = '' ;
190191 $ GLOBALS ['target ' ] = 'testTarget ' ;
191192 $ GLOBALS ['db ' ] = 'testDb ' ;
192193 $ GLOBALS ['table ' ] = 'testTable ' ;
@@ -308,7 +309,6 @@ public function testAuth()
308309 $ GLOBALS ['cfg ' ]['Lang ' ] = '' ;
309310 $ GLOBALS ['cfg ' ]['AllowArbitraryServer ' ] = false ;
310311 $ GLOBALS ['cfg ' ]['Servers ' ] = array (1 );
311- $ _SESSION ['last_valid_captcha ' ] = false ;
312312 $ GLOBALS ['cfg ' ]['CaptchaLoginPrivateKey ' ] = 'testprivkey ' ;
313313 $ GLOBALS ['cfg ' ]['CaptchaLoginPublicKey ' ] = 'testpubkey ' ;
314314 $ GLOBALS ['server ' ] = 0 ;
@@ -431,7 +431,6 @@ public function testAuthCheck()
431431
432432 // case 2
433433
434- $ _SESSION ['last_valid_captcha ' ] = false ;
435434 $ GLOBALS ['cfg ' ]['CaptchaLoginPrivateKey ' ] = 'testprivkey ' ;
436435 $ GLOBALS ['cfg ' ]['CaptchaLoginPublicKey ' ] = 'testpubkey ' ;
437436 $ _POST ["g-recaptcha-response " ] = '' ;
@@ -481,7 +480,8 @@ public function testAuthCheck()
481480
482481 // case 6
483482
484- $ _SESSION ['last_valid_captcha ' ] = true ;
483+ $ GLOBALS ['cfg ' ]['CaptchaLoginPrivateKey ' ] = '' ;
484+ $ GLOBALS ['cfg ' ]['CaptchaLoginPublicKey ' ] = '' ;
485485 $ _REQUEST ['old_usr ' ] = '' ;
486486 $ _REQUEST ['pma_username ' ] = 'testPMAUser ' ;
487487 $ _REQUEST ['pma_servername ' ] = 'testPMAServer ' ;
@@ -611,7 +611,8 @@ public function testAuthCheckDecryptUser()
611611 $ _COOKIE ['pma_iv-1 ' ] = base64_encode ('testiv09testiv09 ' );
612612 $ GLOBALS ['cfg ' ]['blowfish_secret ' ] = 'secret ' ;
613613 $ _SESSION ['last_access_time ' ] = '' ;
614- $ _SESSION ['last_valid_captcha ' ] = true ;
614+ $ GLOBALS ['cfg ' ]['CaptchaLoginPrivateKey ' ] = '' ;
615+ $ GLOBALS ['cfg ' ]['CaptchaLoginPublicKey ' ] = '' ;
615616
616617 // mock for blowfish function
617618 $ this ->object = $ this ->getMockBuilder ('AuthenticationCookie ' )
@@ -649,7 +650,8 @@ public function testAuthCheckDecryptPassword()
649650 $ _COOKIE ['pmaPass-1 ' ] = 'pmaPass1 ' ;
650651 $ _COOKIE ['pma_iv-1 ' ] = base64_encode ('testiv09testiv09 ' );
651652 $ GLOBALS ['cfg ' ]['blowfish_secret ' ] = 'secret ' ;
652- $ _SESSION ['last_valid_captcha ' ] = true ;
653+ $ GLOBALS ['cfg ' ]['CaptchaLoginPrivateKey ' ] = '' ;
654+ $ GLOBALS ['cfg ' ]['CaptchaLoginPublicKey ' ] = '' ;
653655 $ _SESSION ['last_access_time ' ] = time () - 1000 ;
654656 $ GLOBALS ['cfg ' ]['LoginCookieValidity ' ] = 1440 ;
655657
@@ -694,7 +696,8 @@ public function testAuthCheckAuthFails()
694696 $ _COOKIE ['pma_iv-1 ' ] = base64_encode ('testiv09testiv09 ' );
695697 $ GLOBALS ['cfg ' ]['blowfish_secret ' ] = 'secret ' ;
696698 $ _SESSION ['last_access_time ' ] = 1 ;
697- $ _SESSION ['last_valid_captcha ' ] = true ;
699+ $ GLOBALS ['cfg ' ]['CaptchaLoginPrivateKey ' ] = '' ;
700+ $ GLOBALS ['cfg ' ]['CaptchaLoginPublicKey ' ] = '' ;
698701 $ GLOBALS ['cfg ' ]['LoginCookieValidity ' ] = 0 ;
699702 $ _SESSION ['last_access_time ' ] = -1 ;
700703 // mock for blowfish function
0 commit comments