mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Dont allow plain text friendly errors
This commit is contained in:
parent
d2fa01fb17
commit
aeb4aa9565
@ -340,6 +340,7 @@ class Debug {
|
||||
if(Director::is_ajax()) {
|
||||
echo $friendlyErrorMessage;
|
||||
} else {
|
||||
if(!headers_sent()) header('Content-Type: text/html');
|
||||
if(class_exists('ErrorPage')){
|
||||
$errorFilePath = ErrorPage::get_filepath_for_errorcode(
|
||||
$statusCode,
|
||||
@ -347,7 +348,6 @@ class Debug {
|
||||
);
|
||||
if(file_exists($errorFilePath)) {
|
||||
$content = file_get_contents($errorFilePath);
|
||||
if(!headers_sent()) header('Content-Type: text/html');
|
||||
// $BaseURL is left dynamic in error-###.html, so that multi-domain sites don't get broken
|
||||
echo str_replace('$BaseURL', Director::absoluteBaseURL(), $content);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user