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

Issue 13251012: Fix b180514: Some exception entries cannot be deleted from a setting panel. (Closed)

Created:
7 years, 8 months ago by yhirano
Modified:
7 years, 8 months ago
CC:
chromium-reviews, tyoshino (SeeGerritForStatus)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fix b180514: Some exception entries cannot be deleted from a setting panel. This bug is caused by single trailing dot trimming from the input. Fixed it by forbidding a pattern if canonicalization is not idempotent, i.e. the pattern canonicalized twice differs from the pattern canonicalized once. BUG=180514 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192984

Patch Set 1 #

Total comments: 2

Patch Set 2 : Forbid multiple ending dots. #

Total comments: 4

Patch Set 3 : Forbid consecutive dots in the host part. #

Patch Set 4 : Forbid the empty host. #

Patch Set 5 : Refactoring #

Total comments: 3

Patch Set 6 : Do not check the host part of a pattern strictly #

Total comments: 4

Patch Set 7 : Fix code style #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -1 line) Patch
M chrome/common/content_settings_pattern.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/common/content_settings_pattern_unittest.cc View 1 2 3 4 5 3 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 33 (0 generated)
yhirano
7 years, 8 months ago (2013-04-01 17:52:56 UTC) #1
jochen (gone - plz use gerrit)
https://codereview.chromium.org/13251012/diff/1/chrome/common/content_settings_pattern.cc File chrome/common/content_settings_pattern.cc (right): https://codereview.chromium.org/13251012/diff/1/chrome/common/content_settings_pattern.cc#newcode188 chrome/common/content_settings_pattern.cc:188: canonicalized_host = TrimEndingDots(canonicalized_host); this change seems wrong. I'll comment ...
7 years, 8 months ago (2013-04-02 08:09:36 UTC) #2
yhirano
I rewrote the patch and it forbids multiple ending dots. https://codereview.chromium.org/13251012/diff/1/chrome/common/content_settings_pattern.cc File chrome/common/content_settings_pattern.cc (right): https://codereview.chromium.org/13251012/diff/1/chrome/common/content_settings_pattern.cc#newcode188 ...
7 years, 8 months ago (2013-04-02 17:38:24 UTC) #3
markusheintz_
https://codereview.chromium.org/13251012/diff/4002/chrome/common/content_settings_pattern.cc File chrome/common/content_settings_pattern.cc (right): https://codereview.chromium.org/13251012/diff/4002/chrome/common/content_settings_pattern.cc#newcode178 chrome/common/content_settings_pattern.cc:178: host[host.size() - 1] == '.' && What about a..a? ...
7 years, 8 months ago (2013-04-02 19:16:46 UTC) #4
yhirano
https://codereview.chromium.org/13251012/diff/4002/chrome/common/content_settings_pattern.cc File chrome/common/content_settings_pattern.cc (right): https://codereview.chromium.org/13251012/diff/4002/chrome/common/content_settings_pattern.cc#newcode178 chrome/common/content_settings_pattern.cc:178: host[host.size() - 1] == '.' && On 2013/04/02 19:16:46, ...
7 years, 8 months ago (2013-04-02 19:54:53 UTC) #5
markusheintz_
LGTM from my side. Please also wait for Jochen's LGTM
7 years, 8 months ago (2013-04-02 20:03:20 UTC) #6
jochen (gone - plz use gerrit)
https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc File chrome/common/content_settings_pattern_parser.cc (right): https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc#newcode142 chrome/common/content_settings_pattern_parser.cc:142: if (host == "." || host.find("..") != std::string::npos) { ...
7 years, 8 months ago (2013-04-03 09:12:36 UTC) #7
markusheintz_
https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc File chrome/common/content_settings_pattern_parser.cc (right): https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc#newcode142 chrome/common/content_settings_pattern_parser.cc:142: if (host == "." || host.find("..") != std::string::npos) { ...
7 years, 8 months ago (2013-04-03 09:48:40 UTC) #8
markusheintz_
On 2013/04/03 09:48:40, markusheintz_ wrote: > https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc > File chrome/common/content_settings_pattern_parser.cc (right): > > https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc#newcode142 > ...
7 years, 8 months ago (2013-04-03 09:53:12 UTC) #9
yhirano
https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc File chrome/common/content_settings_pattern_parser.cc (right): https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc#newcode142 chrome/common/content_settings_pattern_parser.cc:142: if (host == "." || host.find("..") != std::string::npos) { ...
7 years, 8 months ago (2013-04-03 09:59:10 UTC) #10
yhirano
On 2013/04/03 09:59:10, yhirano wrote: > https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc > File chrome/common/content_settings_pattern_parser.cc (right): > > https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc#newcode142 > ...
7 years, 8 months ago (2013-04-03 10:22:41 UTC) #11
jochen (gone - plz use gerrit)
On 2013/04/03 09:59:10, yhirano wrote: > https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc > File chrome/common/content_settings_pattern_parser.cc (right): > > https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc#newcode142 > ...
7 years, 8 months ago (2013-04-03 10:51:56 UTC) #12
yhirano
On 2013/04/03 10:51:56, jochen wrote: > On 2013/04/03 09:59:10, yhirano wrote: > > > https://codereview.chromium.org/13251012/diff/11001/chrome/common/content_settings_pattern_parser.cc ...
7 years, 8 months ago (2013-04-03 11:12:29 UTC) #13
jochen (gone - plz use gerrit)
On 2013/04/03 11:12:29, yhirano wrote: > On 2013/04/03 10:51:56, jochen wrote: > > On 2013/04/03 ...
7 years, 8 months ago (2013-04-03 11:13:40 UTC) #14
markusheintz_
1-3 is wrong if they are meant to be domains On 2013/04/03 11:13:40, jochen wrote: ...
7 years, 8 months ago (2013-04-03 11:14:43 UTC) #15
markusheintz_
Just because GURL supports this does not mean it is valid. :( Also we are ...
7 years, 8 months ago (2013-04-03 11:15:47 UTC) #16
jochen (gone - plz use gerrit)
Right, but the actual issue is that repeatedly converting a pattern to a string and ...
7 years, 8 months ago (2013-04-03 11:19:00 UTC) #17
yhirano
It is OK for me if a solution 1) fixes the issue, and 2) is ...
7 years, 8 months ago (2013-04-03 11:33:24 UTC) #18
yhirano
> I am no strong opinion I have no strong opinion On 2013/04/03 11:33:24, yhirano ...
7 years, 8 months ago (2013-04-03 11:37:49 UTC) #19
markusheintz_
Ok after discussing this with Jochen offline, let's go with Jochen's proposal and check if ...
7 years, 8 months ago (2013-04-03 12:13:18 UTC) #20
yhirano
Thank you very much! I will do that. On 2013/04/03 12:13:18, markusheintz_ wrote: > Ok ...
7 years, 8 months ago (2013-04-03 12:25:35 UTC) #21
yhirano
jochen@, markusheints_@, can you review the patch again?
7 years, 8 months ago (2013-04-05 01:23:21 UTC) #22
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/13251012/diff/11002/chrome/common/content_settings_pattern.cc File chrome/common/content_settings_pattern.cc (right): https://codereview.chromium.org/13251012/diff/11002/chrome/common/content_settings_pattern.cc#newcode160 chrome/common/content_settings_pattern.cc:160: return ContentSettingsPattern(parts_, is_valid_); nit. just return ContentSettingsPattern() https://codereview.chromium.org/13251012/diff/11002/chrome/common/content_settings_pattern.cc#newcode170 ...
7 years, 8 months ago (2013-04-05 11:23:47 UTC) #23
markusheintz_
LGTM Thanks a lot for fixing this issue and all your patient during the code ...
7 years, 8 months ago (2013-04-05 11:51:12 UTC) #24
yhirano
Thank you very much for reviewing. https://codereview.chromium.org/13251012/diff/11002/chrome/common/content_settings_pattern.cc File chrome/common/content_settings_pattern.cc (right): https://codereview.chromium.org/13251012/diff/11002/chrome/common/content_settings_pattern.cc#newcode160 chrome/common/content_settings_pattern.cc:160: return ContentSettingsPattern(parts_, is_valid_); ...
7 years, 8 months ago (2013-04-08 00:37:45 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/13251012/31001
7 years, 8 months ago (2013-04-08 00:38:00 UTC) #26
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-08 00:45:40 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/13251012/31001
7 years, 8 months ago (2013-04-08 04:52:07 UTC) #28
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-08 04:56:31 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/13251012/31001
7 years, 8 months ago (2013-04-09 00:26:31 UTC) #30
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 8 months ago (2013-04-09 01:02:39 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/13251012/31001
7 years, 8 months ago (2013-04-09 01:04:43 UTC) #32
commit-bot: I haz the power
7 years, 8 months ago (2013-04-09 01:53:03 UTC) #33
Message was sent while issue was closed.
Change committed as 192984

Powered by Google App Engine
This is Rietveld 408576698