[webkit-changes] [WebKit/WebKit] dd5c48: Trusted Types policy name CSP logic incorrectly ha...

Luke Warlow noreply at github.com
Wed Feb 5 06:59:38 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dd5c487fbeadfcf2d28a1c5d65b128ca508c7b35
      https://github.com/WebKit/WebKit/commit/dd5c487fbeadfcf2d28a1c5d65b128ca508c7b35
  Author: Luke Warlow <lwarlow at igalia.com>
  Date:   2025-02-05 (Wed, 05 Feb 2025)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/trusted-types/trusted-types-reporting-expected.txt
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/trusted-types/trusted-types-reporting-expected.txt
    M LayoutTests/platform/win/imported/w3c/web-platform-tests/trusted-types/trusted-types-reporting-expected.txt
    M Source/WebCore/page/csp/ContentSecurityPolicy.cpp
    M Source/WebCore/page/csp/ContentSecurityPolicyTrustedTypesDirective.cpp

  Log Message:
  -----------
  Trusted Types policy name CSP logic incorrectly handles multiple directives
https://bugs.webkit.org/show_bug.cgi?id=286917

Reviewed by Tim Nguyen.

Previously the violation disposition could get incorrectly moved back to "Allowed" by a later
CSP header. This patch updates the logic to correct this.

Now once a header disallows a policy name it stays disallowed.

* LayoutTests/imported/w3c/web-platform-tests/trusted-types/trusted-types-reporting-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/trusted-types/trusted-types-reporting-expected.txt:
* LayoutTests/platform/win/imported/w3c/web-platform-tests/trusted-types/trusted-types-reporting-expected.txt:
* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowTrustedTypesPolicy const):
* Source/WebCore/page/csp/ContentSecurityPolicyTrustedTypesDirective.cpp:
(WebCore::ContentSecurityPolicyTrustedTypesDirective::allows const):

Canonical link: https://commits.webkit.org/289865@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list