⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 194065 in webkit


Ignore:
Timestamp:
Dec 14, 2015, 3:07:24 PM (11 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r194001. rdar://problem/23581577

Location:
branches/safari-601-branch
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-601-branch/LayoutTests/ChangeLog

    r193978 r194065  
     12015-12-14  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r194001. rdar://problem/23581577
     4
     5    2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
     6
     7            Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
     8            https://bugs.webkit.org/show_bug.cgi?id=152102
     9            <rdar://problem/22124230>
     10
     11            Reviewed by Andy Estes.
     12
     13            * http/tests/contentdispositionattachmentsandbox/resources/echo-http-referer.php: Added.
     14            * http/tests/contentdispositionattachmentsandbox/resources/subresource-request-not-include-referer-header-frame.php: Added.
     15            * http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header-expected.txt: Added.
     16            * http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html: Added.
     17
    1182015-12-11  Matthew Hanson  <matthew_hanson@apple.com>
    219
  • branches/safari-601-branch/Source/WebCore/ChangeLog

    r194064 r194065  
     12015-12-14  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r194001. rdar://problem/23581577
     4
     5    2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
     6
     7            Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
     8            https://bugs.webkit.org/show_bug.cgi?id=152102
     9            <rdar://problem/22124230>
     10
     11            Reviewed by Andy Estes.
     12
     13            Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
     14            "Content-Disposition: attachment".
     15
     16            Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
     17
     18            * dom/Document.cpp:
     19            (WebCore::Document::processReferrerPolicy):
     20            (WebCore::Document::applyContentDispositionAttachmentSandbox):
     21
    1222015-12-14  Matthew Hanson  <matthew_hanson@apple.com>
    223
  • branches/safari-601-branch/Source/WebCore/dom/Document.cpp

    r193966 r194065  
    32703270    ASSERT(!policy.isNull());
    32713271
     3272    // Documents in a Content-Disposition: attachment sandbox should never send a Referer header,
     3273    // even if the document has a meta tag saying otherwise.
     3274    if (shouldEnforceContentDispositionAttachmentSandbox())
     3275        return;
     3276
    32723277    // Note that we're supporting both the standard and legacy keywords for referrer
    32733278    // policies, as defined by http://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-meta
     
    49494954    enforceSandboxFlags(m_frame->loader().effectiveSandboxFlags());
    49504955
    4951     if (shouldEnforceContentDispositionAttachmentSandbox())
    4952         enforceSandboxFlags(SandboxAll);
     4956    if (shouldEnforceContentDispositionAttachmentSandbox()) {
     4957        setReferrerPolicy(ReferrerPolicyNever);
     4958        enforceSandboxFlags(SandboxAll);       
     4959    }
    49534960
    49544961    setSecurityOriginPolicy(SecurityOriginPolicy::create(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique() : SecurityOrigin::create(m_url)));
Note: See TracChangeset for help on using the changeset viewer.