From e6f6dab3b096e78d8118b29495085753a9095d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 25 Jun 2014 14:08:03 +0200 Subject: [PATCH] Fixed cookie based login for installations without mcrypt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bug #4469 Signed-off-by: Michal Čihař --- ChangeLog | 1 + .../plugins/auth/AuthenticationCookie.class.php | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a0be7d9a7..3335c2ad3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog - bug #4467 shell_exec() has been disabled for security reasons - bug #4470 Error while submitting empty query - bug #4463 Fatal error: Class 'PMA_DatabaseInterface' not found +- bug #4469 Fixed cookie based login for installations without mcrypt 4.2.4.0 (2014-06-20) - bug #4449 Mediawiki export does not produce table header row; also fix related PHP warnings diff --git a/libraries/plugins/auth/AuthenticationCookie.class.php b/libraries/plugins/auth/AuthenticationCookie.class.php index 553331530e..a3e05e6111 100644 --- a/libraries/plugins/auth/AuthenticationCookie.class.php +++ b/libraries/plugins/auth/AuthenticationCookie.class.php @@ -786,11 +786,17 @@ class AuthenticationCookie extends AuthenticationPlugin mcrypt_enc_get_iv_size($td), MCRYPT_DEV_URANDOM ); - $GLOBALS['PMA_Config']->setCookie( - 'pma_mcrypt_iv', - base64_encode($this->_blowfish_iv) - ); + } else { + /* + * We don't use this value without mcrypt, but let's set it + * so that we don't have to check conditionally for it. + */ + $this->_blowfish_iv = 'dummy'; } + $GLOBALS['PMA_Config']->setCookie( + 'pma_mcrypt_iv', + base64_encode($this->_blowfish_iv) + ); } /**