diff --git a/ChangeLog b/ChangeLog index 8f03c3234c..568a9eaf7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,10 @@ phpMyAdmin - ChangeLog - issue #11881 Full processlist lost on refresh - issue #11834 Adjust privileges fails if database name contains underscores +4.5.4.1 (2016-01-29) +- issue #11892 Error with PMA 4.4.15.3 +- issue #11896 Remove hard dependency on phpseclib + 4.5.4.0 (2016-01-28) - issue #11724 live data edit of big sets is not working - issue Table list not saved in db QBE bookmarked search diff --git a/libraries/plugins/auth/AuthenticationCookie.class.php b/libraries/plugins/auth/AuthenticationCookie.class.php index 4318502709..9033c6b557 100644 --- a/libraries/plugins/auth/AuthenticationCookie.class.php +++ b/libraries/plugins/auth/AuthenticationCookie.class.php @@ -41,7 +41,7 @@ if (! function_exists('openssl_encrypt') require PHPSECLIB_INC_DIR . '/Crypt/Base.php'; require PHPSECLIB_INC_DIR . '/Crypt/Rijndael.php'; require PHPSECLIB_INC_DIR . '/Crypt/AES.php'; - require PHPSECLIB_INC_DIR . '/Crypt/Random.php'; + require_once PHPSECLIB_INC_DIR . '/Crypt/Random.php'; } /** diff --git a/libraries/session.inc.php b/libraries/session.inc.php index 4413c968f4..964a103578 100644 --- a/libraries/session.inc.php +++ b/libraries/session.inc.php @@ -13,7 +13,9 @@ if (! defined('PHPMYADMIN')) { exit; } -require PHPSECLIB_INC_DIR . '/Crypt/Random.php'; +if (! function_exists('openssl_random_pseudo_bytes')) { + require_once PHPSECLIB_INC_DIR . '/Crypt/Random.php'; +} // verify if PHP supports session, die if it does not @@ -113,7 +115,11 @@ if (! isset($_COOKIE[$session_name])) { * (we use "space PMA_token space" to prevent overwriting) */ if (! isset($_SESSION[' PMA_token '])) { - $_SESSION[' PMA_token '] = bin2hex(phpseclib\Crypt\Random::string(16)); + if (! function_exists('openssl_random_pseudo_bytes')) { + $_SESSION[' PMA_token '] = bin2hex(phpseclib\Crypt\Random::string(16)); + } else { + $_SESSION[' PMA_token '] = bin2hex(openssl_random_pseudo_bytes(16)); + } } /** @@ -132,5 +138,9 @@ function PMA_secureSession() ) { session_regenerate_id(true); } - $_SESSION[' PMA_token '] = bin2hex(phpseclib\Crypt\Random::string(16)); + if (! function_exists('openssl_random_pseudo_bytes')) { + $_SESSION[' PMA_token '] = bin2hex(phpseclib\Crypt\Random::string(16)); + } else { + $_SESSION[' PMA_token '] = bin2hex(openssl_random_pseudo_bytes(16)); + } }