Commit a8e1fcc8 authored by Arthur Edelstein's avatar Arthur Edelstein Committed by Georg Koppen
Browse files

Bug 24052: Handle redirects by blocking them early

This is the second part of the workaround for
https://bugzilla.mozilla.org/show_bug.cgi?id=1412081.
parent 8db44df1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5419,6 +5419,13 @@ nsHttpChannel::AsyncProcessRedirection(uint32_t redirectType)
        return NS_ERROR_CORRUPTED_CONTENT;
    }

    bool isRedirectToFile = false;
    rv = mRedirectURI->SchemeIs("file", &isRedirectToFile);
    if (!NS_FAILED(rv) && isRedirectToFile) {
        LOG(("Attempted to redirect from a remote page to a file:// URI."));
        return NS_ERROR_FAILURE;
    }

    if (mApplicationCache) {
        // if we are redirected to a different origin check if there is a fallback
        // cache entry to fall back to. we don't care about file strict