Backed out changeset 890bcaee9b7d (bug 1529068) for causing massive tier2 failures on central in dom/security/test/csp/test_navigate_to.html. CLOSED TREE
This commit is contained in:
@@ -4025,8 +4025,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
CopyUTF8toUTF16(host, *formatStrs.AppendElement());
|
||||
error = "netTimeout";
|
||||
} else if (NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION == aError ||
|
||||
NS_ERROR_CSP_FORM_ACTION_VIOLATION == aError ||
|
||||
NS_ERROR_CSP_NAVIGATE_TO_VIOLATION == aError) {
|
||||
NS_ERROR_CSP_FORM_ACTION_VIOLATION == aError) {
|
||||
// CSP error
|
||||
cssClass.AssignLiteral("neterror");
|
||||
error = "cspBlocked";
|
||||
@@ -9868,21 +9867,6 @@ static bool HasHttpScheme(nsIURI* aURI) {
|
||||
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp = aLoadState->Csp();
|
||||
if (csp) {
|
||||
// Check CSP navigate-to
|
||||
bool allowsNavigateTo = false;
|
||||
aRv = csp->GetAllowsNavigateTo(aLoadState->URI(), aLoadInfo,
|
||||
false, /* aWasRedirected */
|
||||
false, /* aEnforceWhitelist */
|
||||
&allowsNavigateTo);
|
||||
if (NS_FAILED(aRv)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!allowsNavigateTo) {
|
||||
aRv = NS_ERROR_CSP_NAVIGATE_TO_VIOLATION;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Navigational requests that are same origin need to be upgraded in case
|
||||
// upgrade-insecure-requests is present.
|
||||
bool upgradeInsecureRequests = false;
|
||||
|
||||
Reference in New Issue
Block a user