mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 04:47:31 +09:00
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.
This commit is contained in:
parent
cb8e2c2e59
commit
0745ec7c54
1 changed files with 0 additions and 19 deletions
|
|
@ -995,25 +995,6 @@ nsJARChannel::OnStartRequest(nsIRequest *req, nsISupports *ctx)
|
||||||
mRequest = req;
|
mRequest = req;
|
||||||
nsresult rv = mListener->OnStartRequest(this, mListenerContext);
|
nsresult rv = mListener->OnStartRequest(this, mListenerContext);
|
||||||
mRequest = nullptr;
|
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;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue