From 3968897fb4b227b1a634700cbeaea715e58ac543 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Tue, 3 Apr 2018 19:50:55 +0200 Subject: Bug 1431095 - Change Content-Type-Options: nosniff allowed script MIME types to match the spec --- netwerk/protocol/http/nsHttpChannel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netwerk') diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index ce0f45dabe..94b0d9bf93 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -1152,7 +1152,7 @@ ProcessXCTO(nsIURI* aURI, nsHttpResponseHead* aResponseHead, nsILoadInfo* aLoadI } if (aLoadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_SCRIPT) { - if (nsContentUtils::IsScriptType(contentType)) { + if (nsContentUtils::IsJavascriptMIMEType(NS_ConvertUTF8toUTF16(contentType))) { return NS_OK; } ReportTypeBlocking(aURI, aLoadInfo, "MimeTypeMismatch"); -- cgit v1.2.3