Changeset 188062 in webkit
- Timestamp:
- Aug 6, 2015 2:36:00 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r188061 r188062 1 2015-08-06 Eric Carlson <eric.carlson@apple.com> 2 3 Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument 4 https://bugs.webkit.org/show_bug.cgi?id=147734 5 rdar://problem/22028179 6 7 Reviewed by Andy Estes. 8 9 Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735 10 11 * dom/Document.cpp: 12 (WebCore::Document::initSecurityContext): Use applyContentDispositionAttachmentSandbox 13 instead of setting sandbox flags directly. 14 (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Don't special 15 case MediaDocument. 16 (WebCore::Document::applyContentDispositionAttachmentSandbox): Apply sandbox flags 17 according to document type. 18 * dom/Document.h: 19 1 20 2015-08-06 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/Source/WebCore/dom/Document.cpp
r188051 r188062 4937 4937 4938 4938 if (shouldEnforceContentDispositionAttachmentSandbox()) 4939 enforceSandboxFlags(SandboxAll);4939 applyContentDispositionAttachmentSandbox(); 4940 4940 4941 4941 setSecurityOriginPolicy(SecurityOriginPolicy::create(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique() : SecurityOrigin::create(m_url))); … … 6718 6718 return false; 6719 6719 6720 if (isMediaDocument())6721 return false;6722 6723 6720 bool contentDispositionAttachmentSandboxEnabled = settings() && settings()->contentDispositionAttachmentSandboxEnabled(); 6724 6721 bool responseIsAttachment = false; … … 6729 6726 } 6730 6727 6728 void Document::applyContentDispositionAttachmentSandbox() 6729 { 6730 ASSERT(shouldEnforceContentDispositionAttachmentSandbox()); 6731 6732 if (!isMediaDocument()) 6733 enforceSandboxFlags(SandboxAll); 6734 else 6735 enforceSandboxFlags(SandboxOrigin); 6736 } 6737 6731 6738 } // namespace WebCore -
trunk/Source/WebCore/dom/Document.h
r188041 r188062 1280 1280 ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicyToPropagate() const; 1281 1281 bool shouldEnforceContentDispositionAttachmentSandbox() const; 1282 void applyContentDispositionAttachmentSandbox(); 1282 1283 1283 1284 protected:
Note: See TracChangeset
for help on using the changeset viewer.