Remove error.php
Redirecting to other script introduces possibility of inject custom messages to it. Though there is no clear security issue in this, it might confuse users and mistake them to go to external site as it allows to include links. Conflicts: error.php libraries/core.lib.php
This commit is contained in:
@@ -261,21 +261,18 @@ function PMA_fatalError($error_message, $message_args = null)
|
||||
$error_message = strtr($error_message, array('<br />' => '[br]'));
|
||||
|
||||
// Displays the error message
|
||||
// (do not use & for parameters sent by header)
|
||||
$query_params = array(
|
||||
'lang' => $GLOBALS['available_languages'][$GLOBALS['lang']][2],
|
||||
'dir' => $GLOBALS['text_dir'],
|
||||
'type' => $GLOBALS['strError'],
|
||||
'error' => $error_message,
|
||||
);
|
||||
header('Location: ' . (defined('PMA_SETUP') ? '../' : '') . 'error.php?'
|
||||
. http_build_query($query_params, null, '&'));
|
||||
$lang = $GLOBALS['available_languages'][$GLOBALS['lang']][2];
|
||||
$dir = $GLOBALS['text_dir'];
|
||||
$type = $GLOBALS['strError'];
|
||||
$error = $error_message;
|
||||
|
||||
// on fatal errors it cannot hurt to always delete the current session
|
||||
if (isset($GLOBALS['session_name']) && isset($_COOKIE[$GLOBALS['session_name']])) {
|
||||
PMA_removeCookie($GLOBALS['session_name']);
|
||||
}
|
||||
|
||||
require('./libraries/error.inc.php');
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user