PMCORE-3474: X-Content-Type-Options Header Missing - Telefonica of Guatemala Security Analysis (Issue Rep# 11)
code style solve code review notes
This commit is contained in:
@@ -806,6 +806,7 @@ class Bootstrap
|
||||
public static function streamCSSBigFile($filename)
|
||||
{
|
||||
header('Content-Type: text/css');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
|
||||
//First get Skin info
|
||||
$filenameParts = explode("-", $filename);
|
||||
@@ -969,7 +970,7 @@ class Bootstrap
|
||||
header('Content-Disposition: attachment; filename="' . $downloadFileName . '"');
|
||||
}
|
||||
header('Content-Type: ' . $contentType);
|
||||
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
// if userAgent (BROWSER) is MSIE we need special headers to avoid MSIE
|
||||
// behaivor.
|
||||
$userAgent = strtolower($_SERVER ['HTTP_USER_AGENT']);
|
||||
|
||||
@@ -947,7 +947,7 @@ class G
|
||||
public static function streamCSSBigFile($filename)
|
||||
{
|
||||
header('Content-Type: text/css');
|
||||
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
//First get Skin info
|
||||
$filenameParts = explode("-", $filename);
|
||||
$skinName = $filenameParts[0];
|
||||
@@ -1252,7 +1252,7 @@ class G
|
||||
header('Content-Disposition: inline; filename="' . $downloadFileName . '"');
|
||||
}
|
||||
header('Content-Type: ' . $contentType);
|
||||
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
//if userAgent (BROWSER) is MSIE we need special headers to avoid MSIE behaivor.
|
||||
$userAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
if (preg_match("/msie/i", $userAgent)) {
|
||||
|
||||
Reference in New Issue
Block a user