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

Changeset 246129 in webkit


Ignore:
Timestamp:
Jun 5, 2019, 3:09:25 PM (7 years ago)
Author:
dbates@webkit.org
Message:

[CSP] Data URLs should inherit their CSP policy
https://bugs.webkit.org/show_bug.cgi?id=198572
<rdar://problem/50660927>

Reviewed by Brent Fulgham.

Source/WebCore:

As per <https://w3c.github.io/webappsec-csp/#security-inherit-csp> (Editor's Draft, 28 February 2019) data
URLs should inherit their CSP policy from their parent (if they have one).

Test: http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance.html

  • dom/Document.cpp:

(WebCore::Document::shouldInheritContentSecurityPolicyFromOwner const):

LayoutTests:

Add a test to ensure that a framed data URL inherits its CSP policy from its parent document.

  • http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246127 r246129  
     12019-06-05  Daniel Bates  <dabates@apple.com>
     2
     3        [CSP] Data URLs should inherit their CSP policy
     4        https://bugs.webkit.org/show_bug.cgi?id=198572
     5        <rdar://problem/50660927>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Add a test to ensure that a framed data URL inherits its CSP policy from its parent document.
     10
     11        * http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance-expected.txt: Added.
     12        * http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance.html: Added.
     13
    1142019-06-05  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r246128 r246129  
     12019-06-05  Daniel Bates  <dabates@apple.com>
     2
     3        [CSP] Data URLs should inherit their CSP policy
     4        https://bugs.webkit.org/show_bug.cgi?id=198572
     5        <rdar://problem/50660927>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        As per <https://w3c.github.io/webappsec-csp/#security-inherit-csp> (Editor's Draft, 28 February 2019) data
     10        URLs should inherit their CSP policy from their parent (if they have one).
     11
     12        Test: http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance.html
     13
     14        * dom/Document.cpp:
     15        (WebCore::Document::shouldInheritContentSecurityPolicyFromOwner const):
     16
    1172019-06-05  Saam Barati  <sbarati@apple.com>
    218
  • trunk/Source/WebCore/dom/Document.cpp

    r246056 r246129  
    59045904    if (SecurityPolicy::shouldInheritSecurityOriginFromOwner(m_url))
    59055905        return true;
     5906    if (m_url.protocolIsData())
     5907        return true;
    59065908    if (!isPluginDocument())
    59075909        return false;
Note: See TracChangeset for help on using the changeset viewer.