0

Fix typo in CSP error message

The word |explicitly| was misspelt |explicitely| in a console error
message. Fix that.

Change-Id: Ia9740cba01eac1fda795f0ec7a35e166ad6cb1ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3632484
Commit-Queue: Eric Lawrence <ericlaw@microsoft.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1000767}
This commit is contained in:
Eric Lawrence
2022-05-08 04:06:23 +00:00
committed by Chromium LUCI CQ
parent 296b3507a8
commit 301e01d8b5
4 changed files with 10 additions and 7 deletions
content/browser
services/network/public/cpp/content_security_policy
third_party/blink/renderer/core/frame/csp

@@ -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();
}

@@ -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";

@@ -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

@@ -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 =