Merge remote-tracking branch 'upstream/QA_4_6' into QA_4_6
This commit is contained in:
commit
5125fc3bc0
@ -47,6 +47,8 @@ phpMyAdmin - ChangeLog
|
||||
- issue #11907 Avoid displaying UPDATE query twice
|
||||
- issue #11850 Fixed CSV import
|
||||
- issue Fix SQL syntax highlighting in database search page
|
||||
- issue #12056 Fix error when we can not generate random string
|
||||
- issue #12055 Fixed PHP syntax error in templates
|
||||
|
||||
4.5.5.1 (2016-02-29)
|
||||
- issue #11971 CREATE UNIQUE INDEX index type is not recognized by parser.
|
||||
|
||||
@ -191,14 +191,14 @@ class Util
|
||||
|
||||
// If it's the first time this function is called
|
||||
if (! isset($sprites)) {
|
||||
$sprites = array();
|
||||
// Try to load the list of sprites
|
||||
$sprite_file = $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
|
||||
if (is_readable($sprite_file)) {
|
||||
include_once $sprite_file;
|
||||
$sprites = PMA_sprites();
|
||||
} else {
|
||||
// No sprites are available for this theme
|
||||
$sprites = array();
|
||||
if (isset($_SESSION['PMA_Theme'])) {
|
||||
$sprite_file = $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
|
||||
if (is_readable($sprite_file)) {
|
||||
include_once $sprite_file;
|
||||
$sprites = PMA_sprites();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -246,8 +246,8 @@ function PMA_fatalError(
|
||||
} else {
|
||||
$error_header = 'Error';
|
||||
}
|
||||
$lang = $GLOBALS['lang'];
|
||||
$dir = $GLOBALS['text_dir'];
|
||||
$lang = isset($GLOBALS['lang']) ? $GLOBALS['lang'] : 'en';
|
||||
$dir = isset($GLOBALS['text_dir']) ? $GLOBALS['text_dir'] : 'ltr';
|
||||
|
||||
// on fatal errors it cannot hurt to always delete the current session
|
||||
if ($delete_session
|
||||
|
||||
@ -117,5 +117,13 @@ if (! isset($_SESSION[' PMA_token '])) {
|
||||
$_SESSION[' PMA_token '] = bin2hex(openssl_random_pseudo_bytes(16));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Check if token is properly generated (both above functions can return false).
|
||||
*/
|
||||
if (empty($_SESSION[' PMA_token '])) {
|
||||
PMA_fatalError(
|
||||
'Failed to generate random CSRF token!'
|
||||
);
|
||||
}
|
||||
|
||||
require_once 'libraries/session.lib.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user