summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-11-06 21:36:50 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-11-06 21:58:44 +0100
commit3c5a34c90075c8cee4be7d316f4b2d7390f7bc29 (patch)
tree38180fed14154f53d042336fac79d0315e23d127
parenta0a37ffd4a9410435b2dd45f372732cb802567f7 (diff)
downloadUXP-3c5a34c90075c8cee4be7d316f4b2d7390f7bc29.tar
UXP-3c5a34c90075c8cee4be7d316f4b2d7390f7bc29.tar.gz
UXP-3c5a34c90075c8cee4be7d316f4b2d7390f7bc29.tar.lz
UXP-3c5a34c90075c8cee4be7d316f4b2d7390f7bc29.tar.xz
UXP-3c5a34c90075c8cee4be7d316f4b2d7390f7bc29.zip
Back out problematic patch causing issue #865.
This reverts commit f62eee7c510238bf93b6ad43acd8b8a79a44417c. Verified that a hardening patch landed after this already negates what this patch was a stopgap for, so we no longer need it at all.
-rw-r--r--modules/libjar/nsJARChannel.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp
index 2f721fa3f..ee60602da 100644
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -995,25 +995,6 @@ nsJARChannel::OnStartRequest(nsIRequest *req, nsISupports *ctx)
mRequest = req;
nsresult rv = mListener->OnStartRequest(this, mListenerContext);
mRequest = nullptr;
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Restrict loadable content types.
- nsAutoCString contentType;
- GetContentType(contentType);
- auto contentPolicyType = mLoadInfo->GetExternalContentPolicyType();
- if (contentType.Equals(APPLICATION_HTTP_INDEX_FORMAT) &&
- contentPolicyType != nsIContentPolicy::TYPE_DOCUMENT &&
- contentPolicyType != nsIContentPolicy::TYPE_FETCH) {
- return NS_ERROR_CORRUPTED_CONTENT;
- }
- if (contentPolicyType == nsIContentPolicy::TYPE_STYLESHEET &&
- !contentType.EqualsLiteral(TEXT_CSS)) {
- return NS_ERROR_CORRUPTED_CONTENT;
- }
- if (contentPolicyType == nsIContentPolicy::TYPE_SCRIPT &&
- !nsContentUtils::IsJavascriptMIMEType(NS_ConvertUTF8toUTF16(contentType))) {
- return NS_ERROR_CORRUPTED_CONTENT;
- }
return rv;
}