Changeset 117206 in webkit


Ignore:
Timestamp:
May 15, 2012 7:49:13 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

MHTML files should be loadable from all schemes considered local,
not just file:

https://bugs.webkit.org/show_bug.cgi?id=86540

Patch by Greg Spencer <gspencer@chromium.org> on 2012-05-15
Reviewed by Adam Barth.

Current tests should assure that loading is still allowed locally.

  • loader/MainResourceLoader.cpp:

(WebCore::MainResourceLoader::continueAfterContentPolicy):

  • loader/archive/mhtml/MHTMLArchive.cpp:

(WebCore::MHTMLArchive::create):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117203 r117206  
     12012-05-15  Greg Spencer  <gspencer@chromium.org>
     2
     3        MHTML files should be loadable from all schemes considered local,
     4        not just file:
     5
     6        https://bugs.webkit.org/show_bug.cgi?id=86540
     7
     8        Reviewed by Adam Barth.
     9
     10        Current tests should assure that loading is still allowed locally.
     11
     12        * loader/MainResourceLoader.cpp:
     13        (WebCore::MainResourceLoader::continueAfterContentPolicy):
     14        * loader/archive/mhtml/MHTMLArchive.cpp:
     15        (WebCore::MHTMLArchive::create):
     16
    1172012-05-15  Fady Samuel  <fsamuel@chromium.org>
    218
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r117181 r117206  
    268268        // Prevent remote web archives from loading because they can claim to be from any domain and thus avoid cross-domain security checks (4120255).
    269269        bool isRemoteWebArchive = (equalIgnoringCase("application/x-webarchive", mimeType) || equalIgnoringCase("multipart/related", mimeType))
    270             && !m_substituteData.isValid() && !url.isLocalFile();
     270            && !m_substituteData.isValid() && !SchemeRegistry::shouldTreatURLSchemeAsLocal(url);
    271271        if (!frameLoader()->client()->canShowMIMEType(mimeType) || isRemoteWebArchive) {
    272272            frameLoader()->policyChecker()->cannotShowMIMEType(r);
  • trunk/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp

    r113295 r117206  
    4242#include "PageSerializer.h"
    4343#include "QuotedPrintable.h"
     44#include "SchemeRegistry.h"
    4445#include "SharedBuffer.h"
    4546
     
    104105{
    105106    // For security reasons we only load MHTML pages from the local file system.
    106     if (!url.isLocalFile())
     107    if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url))
    107108        return 0;
    108109
Note: See TracChangeset for help on using the changeset viewer.