Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Issue 2806593006: Changed GenerateKeyword to always return keyword in lowercase (Closed)

Created:
3 years, 8 months ago by Alexander Yashkin
Modified:
3 years, 8 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Changed GenerateKeyword to always return keyword in lowercase TemplateURL::GenerateKeyword returns keyword for search engine URL using GURL::host() method. TemplateURLService component that stores TemplateURLs assumes that keywords are always converted to lowercase. GURL::host() can return string with uppercase characters for some exotic URLs. For example for "http://embedded.<html>web" it will return "embedded.%3Ehtml%3Eweb". This could lead to problems when TemplateURLService tries to resolve conflicts between autogenerated keywords. BUG=709761 [email protected], [email protected] Review-Url: https://codereview.chromium.org/2806593006 Cr-Commit-Position: refs/heads/master@{#465946} Committed: https://chromium.googlesource.com/chromium/src/+/81695d0da81e63990e210da79b7a65c7dd386140

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fixed after review, round 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -1 line) Patch
M chrome/browser/search_engines/template_url_service_unittest.cc View 1 1 chunk +23 lines, -0 lines 0 comments Download
M components/search_engines/template_url.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M components/search_engines/template_url_unittest.cc View 1 3 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (8 generated)
Alexander Yashkin
3 years, 8 months ago (2017-04-08 19:48:35 UTC) #1
Peter Kasting
How can this actually happen in the wild? Hostnames should never contain escaped characters.
3 years, 8 months ago (2017-04-09 04:55:36 UTC) #6
Alexander Yashkin
On 2017/04/09 at 04:55:36, pkasting wrote: > How can this actually happen in the wild? ...
3 years, 8 months ago (2017-04-09 06:46:24 UTC) #7
Peter Kasting
Looping in brettw (GURL owner) regarding whether it's correct for GURL to consider an HTTP ...
3 years, 8 months ago (2017-04-09 08:12:45 UTC) #9
Alexander Yashkin
On 2017/04/09 at 08:12:45, pkasting wrote: > Looping in brettw (GURL owner) regarding whether it's ...
3 years, 8 months ago (2017-04-12 07:06:16 UTC) #10
brettw
This is theoretically possible but I'd like to remove support for percent-escaped hostname chars in ...
3 years, 8 months ago (2017-04-17 18:02:14 UTC) #11
Alexander Yashkin
On 2017/04/17 at 18:02:14, brettw wrote: > This is theoretically possible but I'd like to ...
3 years, 8 months ago (2017-04-17 18:21:06 UTC) #12
Peter Kasting
I agree with the assessment of buggy proxies or something. It sounds to me like ...
3 years, 8 months ago (2017-04-17 18:45:36 UTC) #13
brettw
Is it possible to check for % and exit-out of template URL matching?
3 years, 8 months ago (2017-04-17 19:25:43 UTC) #14
Peter Kasting
On 2017/04/17 19:25:43, brettw (plz ping after 24h) wrote: > Is it possible to check ...
3 years, 8 months ago (2017-04-17 19:38:43 UTC) #15
Alexander Yashkin
On 2017/04/17 at 19:38:43, pkasting wrote: > On 2017/04/17 19:25:43, brettw (plz ping after 24h) ...
3 years, 8 months ago (2017-04-18 07:14:28 UTC) #16
Peter Kasting
On 2017/04/18 07:14:28, Alexander Yashkin wrote: > On 2017/04/17 at 19:38:43, pkasting wrote: > > ...
3 years, 8 months ago (2017-04-18 18:46:20 UTC) #17
brettw
Changing canonicalization is scary and I'd rather not mess with it. Peter's suggestion SGTM
3 years, 8 months ago (2017-04-18 19:34:38 UTC) #18
Alexander Yashkin
https://codereview.chromium.org/2806593006/diff/1/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2806593006/diff/1/chrome/browser/search_engines/template_url_service_unittest.cc#newcode1799 chrome/browser/search_engines/template_url_service_unittest.cc:1799: // generated keyword for such URL contained upper case ...
3 years, 8 months ago (2017-04-20 07:05:53 UTC) #19
Peter Kasting
LGTM
3 years, 8 months ago (2017-04-20 07:09:30 UTC) #20
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/2806593006/20001
3 years, 8 months ago (2017-04-20 07:34:55 UTC) #22
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 08:22:34 UTC) #25
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/81695d0da81e63990e210da79b7a...

Powered by Google App Engine
This is Rietveld 408576698