Backed out changeset 99b313550fb8 (bug 1529068) for eslint failure on 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,18 +9867,6 @@ static bool HasHttpScheme(nsIURI* aURI) {
|
||||
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp = aLoadState->Csp();
|
||||
if (csp) {
|
||||
// Check CSP navigate-to
|
||||
bool allowsNavigateTo = false;
|
||||
rv = csp->GetAllowsNavigateTo(aLoadState->URI(), loadInfo,
|
||||
false, /* aWasRedirected */
|
||||
false, /* aEnforceWhitelist */
|
||||
&allowsNavigateTo);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!allowsNavigateTo) {
|
||||
return NS_ERROR_CSP_NAVIGATE_TO_VIOLATION;
|
||||
}
|
||||
|
||||
// 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