[webkit-changes] [WebKit/WebKit] 4bc7c5: Avoid conversion to UTF-8 in ContentSecurityPolicy...

Ryosuke Niwa noreply at github.com
Tue Jan 23 13:38:57 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4bc7c5b5bdd351c52e5b5d810ec2a95c7973c747
      https://github.com/WebKit/WebKit/commit/4bc7c5b5bdd351c52e5b5d810ec2a95c7973c747
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2024-01-23 (Tue, 23 Jan 2024)

  Changed paths:
    M Source/WebCore/page/csp/ContentSecurityPolicy.cpp

  Log Message:
  -----------
  Avoid conversion to UTF-8 in ContentSecurityPolicy::allowInlineStyle when no algorithm is specified
https://bugs.webkit.org/show_bug.cgi?id=267916

Reviewed by Darin Adler.

When there is no CSP policy in place, we don't need to convert the string to UTF-8 for no good reason.

* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
(WebCore::generateHashesForContent):
(WebCore::ContentSecurityPolicy::allowInlineEventHandlers const):
(WebCore::ContentSecurityPolicy::allowScriptWithNonce const):
(WebCore::ContentSecurityPolicy::allowStyleWithNonce const):
(WebCore::ContentSecurityPolicy::allowNonParserInsertedScripts const):
(WebCore::ContentSecurityPolicy::allowInlineScript const):
(WebCore::ContentSecurityPolicy::allowInlineStyle const):
(WebCore::ContentSecurityPolicy::allowEval const):
(WebCore::ContentSecurityPolicy::allowFrameAncestors const):
(WebCore::ContentSecurityPolicy::allowPluginType const):
(WebCore::ContentSecurityPolicy::allowObjectFromSource const):
(WebCore::ContentSecurityPolicy::allowChildFrameFromSource const):
(WebCore::ContentSecurityPolicy::allowResourceFromSource const):
(WebCore::ContentSecurityPolicy::allowWorkerFromSource const):
(WebCore::ContentSecurityPolicy::allowScriptFromSource const):
(WebCore::ContentSecurityPolicy::allowStyleFromSource const):
(WebCore::ContentSecurityPolicy::allowConnectToSource const):
(WebCore::ContentSecurityPolicy::allowBaseURI const):

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




More information about the webkit-changes mailing list