Merge branch 'QA_4_3'

This commit is contained in:
Marc Delisle 2014-12-07 06:41:20 -05:00
commit f87458719e
2 changed files with 14 additions and 3 deletions

View File

@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog
- bug #4618 Page scrolls while GIS visualization is zoomed in/out with mousewheel
- bug #4613 HHVM: method 'ob_gzhandler' not found
- bug #4593 Manual "SELECT" doesn't change active table
- bug #4623 Incomplete PHP OpenSSL support
4.3.0.0 (2014-12-05)
+ rfe #1502 Smart sorting for int keys

View File

@ -31,8 +31,13 @@ require './libraries/plugins/auth/swekey/swekey.auth.lib.php';
/**
* phpseclib
*/
require PHPSECLIB_INC_DIR . '/Crypt/AES.php';
require PHPSECLIB_INC_DIR . '/Crypt/Random.php';
if (! function_exists('openssl_encrypt')
|| ! function_exists('openssl_decrypt')
|| ! function_exists('openssl_random_pseudo_bytes')
|| PHP_VERSION_ID < 50304) {
require PHPSECLIB_INC_DIR . '/Crypt/AES.php';
require PHPSECLIB_INC_DIR . '/Crypt/Random.php';
}
/**
* Handles the cookie authentication method
@ -730,7 +735,11 @@ class AuthenticationCookie extends AuthenticationPlugin
private function _getSessionEncryptionSecret()
{
if (empty($_SESSION['encryption_key'])) {
$_SESSION['encryption_key'] = crypt_random_string(256);
if ($this->_useOpenSSL()) {
$_SESSION['encryption_key'] = openssl_random_pseudo_bytes(256);
} else {
$_SESSION['encryption_key'] = crypt_random_string(256);
}
}
return $_SESSION['encryption_key'];
}
@ -745,6 +754,7 @@ class AuthenticationCookie extends AuthenticationPlugin
return (
function_exists('openssl_encrypt')
&& function_exists('openssl_decrypt')
&& function_exists('openssl_random_pseudo_bytes')
&& PHP_VERSION_ID >= 50304
);
}