Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Issue 2646773002: ContentSecurityPolicy: Fix bug when CSPSource host-part = "*" (Closed)

Created:
3 years, 11 months ago by arthursonzogni
Modified:
3 years, 11 months ago
Reviewers:
Mike West
CC:
clamy
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ContentSecurityPolicy: Fix bug when CSPSource host-part = "*" There were two problems. The first one was that when the host-part was "*" then CSPSource::IsSchemeOnly() returned true, even if there was a path or a port to enforce. For instance when source-expression = 'http://*:111' then 'http://a.com:222' was allowed. The second problem was that in CSPSource::hostmatches(), the host-part == '*' case was not handled. This patch adds tests for these special cases. BUG=682673 Review-Url: https://codereview.chromium.org/2646773002 Cr-Commit-Position: refs/heads/master@{#445417} Committed: https://chromium.googlesource.com/chromium/src/+/8a8b6c2b28a210ca37a500d7e95572ce6126994d

Patch Set 1 : ContentSecurityPolicy: Fix bug when CSPSource host-part = "*" #

Patch Set 2 : Rephrase comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -2 lines) Patch
M third_party/WebKit/Source/core/frame/csp/CSPSource.cpp View 3 chunks +9 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/SourceListDirectiveTest.cpp View 1 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (15 generated)
arthursonzogni
Hi Mike, Please can you take a look at this patch?
3 years, 11 months ago (2017-01-19 14:20:18 UTC) #7
Mike West
LGTM, thanks!
3 years, 11 months ago (2017-01-23 06:44:59 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2646773002/40001
3 years, 11 months ago (2017-01-23 16:13:37 UTC) #16
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 18:38:34 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/8a8b6c2b28a210ca37a500d7e955...

Powered by Google App Engine
This is Rietveld 408576698