Changeset 118402 in webkit
- Timestamp:
- May 24, 2012 12:27:36 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r118400 r118402 1 2012-05-24 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 Existing tests should verify correct function. 11 12 * loader/MainResourceLoader.cpp: 13 (WebCore::MainResourceLoader::continueAfterContentPolicy): 14 * loader/archive/mhtml/MHTMLArchive.cpp: 15 (WebCore::MHTMLArchive::create): 16 1 17 2012-05-24 Dana Jansens <danakj@chromium.org> 2 18 -
trunk/Source/WebCore/loader/MainResourceLoader.cpp
r117226 r118402 268 268 // Prevent remote web archives from loading because they can claim to be from any domain and thus avoid cross-domain security checks (4120255). 269 269 bool isRemoteWebArchive = (equalIgnoringCase("application/x-webarchive", mimeType) || equalIgnoringCase("multipart/related", mimeType)) 270 && !m_substituteData.isValid() && ! url.isLocalFile();270 && !m_substituteData.isValid() && !SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()); 271 271 if (!frameLoader()->client()->canShowMIMEType(mimeType) || isRemoteWebArchive) { 272 272 frameLoader()->policyChecker()->cannotShowMIMEType(r); 273 // Check reachedTerminalState since the load may have already been cancel led inside of _handleUnimplementablePolicyWithErrorCode::.273 // Check reachedTerminalState since the load may have already been canceled inside of _handleUnimplementablePolicyWithErrorCode::. 274 274 if (!reachedTerminalState()) 275 275 stopLoadingForPolicyChange(); -
trunk/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp
r117226 r118402 42 42 #include "PageSerializer.h" 43 43 #include "QuotedPrintable.h" 44 #include "SchemeRegistry.h" 44 45 #include "SharedBuffer.h" 45 46 … … 103 104 PassRefPtr<MHTMLArchive> MHTMLArchive::create(const KURL& url, SharedBuffer* data) 104 105 { 105 // For security reasons we only load MHTML pages from the local file system.106 if (! url.isLocalFile())106 // For security reasons we only load MHTML pages from local URLs. 107 if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol())) 107 108 return 0; 108 109
Note: See TracChangeset
for help on using the changeset viewer.