New issue
Advanced search Search tips

Issue 811932 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Extension URLPatterns aren't canonicalized

Project Member Reported by rdevlin....@chromium.org, Feb 13 2018

Issue description

Extension URLPatterns aren't canonicalized (e.g., with net::CanonicalizeHost [1]).

This at least means that host patterns like "*://*.gOoGle.com/*" will parse successfully, but will never match (because chrome canonicalizes that to google.com).  It may or may not have other subtle implications.

We should canonicalize these.  Whether to fail on a non-canonical host or to silently canonicalize is an open question, but I'd lean towards the latter (unless canonicalization totally fails).

[1] https://chromium.googlesource.com/chromium/src/+/10970564f226c8db1adc1d2c3f0b7136d48acb51/net/base/url_util.h#125
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 23 2018

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

commit b32af8c5a5f828415c028e6a4725d3349003def1
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Fri Feb 23 01:40:56 2018

[Extensions] Canonicalize URLPattern hosts

Ensure that URLPattern hosts, when non-empty, are canonicalized.
Silently update non-canonical hosts (e.g. gOOgle.com) to be
canonical (google.com). Fail only if canonicalization fails.

Bug:  811932 

Change-Id: I87dbea12b972af00a7648f6d715eccb836613366
Reviewed-on: https://chromium-review.googlesource.com/916942
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538659}
[modify] https://crrev.com/b32af8c5a5f828415c028e6a4725d3349003def1/extensions/common/url_pattern.cc
[modify] https://crrev.com/b32af8c5a5f828415c028e6a4725d3349003def1/extensions/common/url_pattern_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment