New issue
Advanced search Search tips

Issue 602470 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

ContentSettingsPattern::Compare weird w/ wildcard domains

Project Member Reported by dmu...@chromium.org, Apr 11 2016

Issue description

When I have a normal pattern, like a "[*.]google.com", and I compare it with "*", I get SUCCESSOR. This doesn't seem correct, as "*" shouldn't have a higher precedence to for urls that match both.
 
Components: Security Privacy
Status: Started (was: Assigned)
Thanks for the report. I may have misunderstood, but I cannot reproduce this.

https://codereview.chromium.org/1880043002/ introduces a passing test that shows "[*.]google.com" is a PREDECESSOR of (i.e. more specific than) "*".

Comment 2 by dmu...@chromium.org, Apr 12 2016

Commented on patch.

I made a mistake with my debugging, sorry for the extra work. But it did reveal a question about how I'm matching contentsettingspatterns, which I left for you on the other CL. Thanks for all your help!

Comment 3 by dmu...@chromium.org, Apr 12 2016

Status: Verified (was: Started)
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/69745e4858c876f6c2329266c28f01a35a41ea6d

commit 69745e4858c876f6c2329266c28f01a35a41ea6d
Author: msramek <msramek@chromium.org>
Date: Wed Apr 13 08:19:05 2016

Add a ContentSettingsPattern test for "*" vs. a site-scoped pattern.

We have tests for "*".Compare(Wildcard()) == IDENTITY and for
Wildcard().Compare("[*.]google.com") == SUCCESSOR. Assuming the comparison
is transitive, it should hold that "*".Compare("[*.]google.com") == SUCCESSOR.

This CL adds an explicit test case, so that we know that the comparison is,
in this case, in fact transitive.

BUG= 602470 

Review URL: https://codereview.chromium.org/1880043002

Cr-Commit-Position: refs/heads/master@{#386936}

[modify] https://crrev.com/69745e4858c876f6c2329266c28f01a35a41ea6d/components/content_settings/core/common/content_settings_pattern_unittest.cc

Sign in to add a comment