diff --git a/content/browser/content_security_policy_browsertest.cc b/content/browser/content_security_policy_browsertest.cc index 03fe259058408..a86e361248982 100644 --- a/content/browser/content_security_policy_browsertest.cc +++ b/content/browser/content_security_policy_browsertest.cc @@ -115,7 +115,8 @@ IN_PROC_BROWSER_TEST_F(ContentSecurityPolicyBrowserTest, "Refused to frame '' because it violates the following Content Security " "Policy directive: \"frame-src *\". Note that '*' matches only URLs with " "network schemes ('http', 'https', 'ws', 'wss'), or URLs whose scheme " - "matches `self`'s scheme. mailto:' must be added explicitely.\n"); + "matches `self`'s scheme. The scheme 'mailto:' must be added " + "explicitly.\n"); EXPECT_TRUE(NavigateToURL(shell(), url)); console_observer.Wait(); } @@ -136,7 +137,8 @@ IN_PROC_BROWSER_TEST_F(ContentSecurityPolicyBrowserTest, "\"script-src *\". Note that 'script-src-elem' was not explicitly set, " "so 'script-src' is used as a fallback. Note that '*' matches only URLs " "with network schemes ('http', 'https', 'ws', 'wss'), or URLs whose " - "scheme matches `self`'s scheme. mailto:' must be added explicitely.\n"); + "scheme matches `self`'s scheme. The scheme 'mailto:' must be added " + "explicitly.\n"); EXPECT_TRUE(NavigateToURL(shell(), url)); console_observer.Wait(); } diff --git a/services/network/public/cpp/content_security_policy/content_security_policy.cc b/services/network/public/cpp/content_security_policy/content_security_policy.cc index 8cc7a856bb43f..4659636dac9a1 100644 --- a/services/network/public/cpp/content_security_policy/content_security_policy.cc +++ b/services/network/public/cpp/content_security_policy/content_security_policy.cc @@ -233,8 +233,8 @@ void ReportViolation(CSPContext* context, if (policy->directives[effective_directive_name]->allow_star) { message << " Note that '*' matches only URLs with network schemes ('http', " "'https', 'ws', 'wss'), or URLs whose scheme matches `self`'s " - "scheme. " - << blocked_url_scheme << ":' must be added explicitely."; + "scheme. The scheme '" + << blocked_url_scheme << ":' must be added explicitly."; } message << "\n"; diff --git a/services/network/public/cpp/content_security_policy/csp_context_unittest.cc b/services/network/public/cpp/content_security_policy/csp_context_unittest.cc index 9043c45f073de..98671bc149ebf 100644 --- a/services/network/public/cpp/content_security_policy/csp_context_unittest.cc +++ b/services/network/public/cpp/content_security_policy/csp_context_unittest.cc @@ -352,7 +352,8 @@ TEST(CSPContextTest, BlockedDespiteWildcard) { "violates the following Content Security Policy directive: " "\"frame-src *\". Note that '*' matches only URLs with network " "schemes ('http', 'https', 'ws', 'wss'), or URLs whose scheme " - "matches `self`'s scheme. data:' must be added explicitely.\n"); + "matches `self`'s scheme. The scheme 'data:' must be added " + "explicitly.\n"); } } // namespace network diff --git a/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc b/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc index a989dea8c0bf0..dbd38a07a41fc 100644 --- a/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc +++ b/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc @@ -614,8 +614,8 @@ bool CheckSourceAndReportViolation( suffix = suffix + " Note that '*' matches only URLs with network schemes ('http', " "'https', 'ws', 'wss'), or URLs whose scheme matches `self`'s " - "scheme. " + - url.Protocol() + ":' must be added explicitely."; + "scheme. The scheme '" + + url.Protocol() + ":' must be added explicitly."; } String raw_directive =