mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
Bug 1294411 - Update XCTO: nosniff implementation to accept images which content type starts with 'image/'. r=dveditz
This commit is contained in:
parent
026f92fc96
commit
f2589e5050
@ -84,7 +84,6 @@
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "AlternateServices.h"
|
||||
#include "InterceptedChannel.h"
|
||||
#include "imgLoader.h"
|
||||
#include "nsIHttpPushListener.h"
|
||||
#include "nsIX509Cert.h"
|
||||
#include "ScopedNSSTypes.h"
|
||||
@ -999,8 +998,7 @@ ProcessXCTO(nsHttpResponseHead* aResponseHead, nsILoadInfo* aLoadInfo)
|
||||
}
|
||||
|
||||
if (aLoadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_IMAGE) {
|
||||
if (imgLoader::SupportImageWithMimeType(contentType.get(),
|
||||
AcceptedMimeTypes::IMAGES_AND_DOCUMENTS)) {
|
||||
if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("image/"))) {
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_CORRUPTED_CONTENT;
|
||||
|
Loading…
Reference in New Issue
Block a user