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

Issue 646333002: Update EscapeExternalHandlerValue to keep '#', '[', and ']' (Closed)

Created:
6 years, 2 months ago by Jaekyun Seok (inactive)
Modified:
6 years, 1 month ago
Reviewers:
asanka, Ryan Sleevi
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Update EscapeExternalHandlerValue to keep '#', '[', and ']' According to RFC 3986, '#' is used as a separator of fragment part, and '[' and ']' are used for IPv6 address. So they should be kept as they are in a URL string. And EscapeExternalHandlerValue should escape '%' if it isn't used as a prefix for %XX. BUG=419257 Committed: https://crrev.com/9e212e96140c2cfc9d259ef6ce620895d0e5a384 Cr-Commit-Position: refs/heads/master@{#301013}

Patch Set 1 #

Patch Set 2 : Sanitize fragment and path #

Total comments: 5

Patch Set 3 : Update function description #

Patch Set 4 : Update EscapeExternalHandlerValue #

Patch Set 5 : Update comments #

Total comments: 8

Patch Set 6 : Add more tests #

Patch Set 7 : Update comments #

Total comments: 2

Patch Set 8 : Add more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -8 lines) Patch
M net/base/escape.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M net/base/escape.cc View 1 2 3 4 5 3 chunks +12 lines, -6 lines 0 comments Download
M net/base/escape_unittest.cc View 1 2 3 4 5 6 7 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (3 generated)
Jaekyun Seok (inactive)
Asanka, could you please review this change because this is followup of https://codereview.chromium.org/632843003/ which you ...
6 years, 2 months ago (2014-10-13 01:47:10 UTC) #2
Jaekyun Seok (inactive)
PTAL. I modified codes to sanitize fragment and path parts as well.
6 years, 2 months ago (2014-10-14 04:48:43 UTC) #3
asanka
https://codereview.chromium.org/646333002/diff/80001/chrome/browser/android/url_sanitize_utils.cc File chrome/browser/android/url_sanitize_utils.cc (right): https://codereview.chromium.org/646333002/diff/80001/chrome/browser/android/url_sanitize_utils.cc#newcode52 chrome/browser/android/url_sanitize_utils.cc:52: }}; Are these tables different from net/base/escape.cc? If not, ...
6 years, 2 months ago (2014-10-14 16:46:03 UTC) #4
Jaekyun Seok (inactive)
PTAL. https://codereview.chromium.org/646333002/diff/80001/chrome/browser/android/url_sanitize_utils.cc File chrome/browser/android/url_sanitize_utils.cc (right): https://codereview.chromium.org/646333002/diff/80001/chrome/browser/android/url_sanitize_utils.cc#newcode52 chrome/browser/android/url_sanitize_utils.cc:52: }}; Yes, both are different from net/base/escape.cc. Moreover, ...
6 years, 2 months ago (2014-10-15 08:02:25 UTC) #5
Jaekyun Seok (inactive)
Ryan, could you please review this change? This is followup of https://codereview.chromium.org/632843003/ which you reviewed. ...
6 years, 2 months ago (2014-10-16 21:37:25 UTC) #7
Ryan Sleevi
Its generally considered poor code review etiquette to switch reviewers midway. I'm going to decline ...
6 years, 2 months ago (2014-10-16 21:40:48 UTC) #8
Jaekyun Seok (inactive)
Really sorry if my asking was unpleasant. I didn't intent to switch reviewers, but I ...
6 years, 2 months ago (2014-10-16 21:47:37 UTC) #9
asanka
https://codereview.chromium.org/646333002/diff/80001/chrome/browser/android/url_sanitize_utils.cc File chrome/browser/android/url_sanitize_utils.cc (right): https://codereview.chromium.org/646333002/diff/80001/chrome/browser/android/url_sanitize_utils.cc#newcode52 chrome/browser/android/url_sanitize_utils.cc:52: }}; On 2014/10/15 08:02:25, Jaekyun Seok wrote: > Yes, ...
6 years, 2 months ago (2014-10-17 00:07:28 UTC) #10
Jaekyun Seok (inactive)
> Doesn't net::EscapeExternalHandlerValue() do what you want? EscapeExternalHandlerValue() just passes "%", so I can't use ...
6 years, 2 months ago (2014-10-17 00:14:36 UTC) #11
Jaekyun Seok (inactive)
On 2014/10/17 00:14:36, Jaekyun Seok wrote: > > Doesn't net::EscapeExternalHandlerValue() do what you want? > ...
6 years, 2 months ago (2014-10-17 00:17:05 UTC) #12
asanka
On 2014/10/17 00:17:05, Jaekyun Seok wrote: > On 2014/10/17 00:14:36, Jaekyun Seok wrote: > > ...
6 years, 2 months ago (2014-10-17 00:30:11 UTC) #13
Jaekyun Seok (inactive)
> Interestingly this function is named poorly and doesn't have unittests. You > should be ...
6 years, 2 months ago (2014-10-17 01:02:48 UTC) #14
Jaekyun Seok (inactive)
I might have misunderstood your comments. Do you mean that EscapeExternalHandlerValue() can be used to ...
6 years, 2 months ago (2014-10-17 02:34:48 UTC) #15
asanka
On 2014/10/17 02:34:48, Jaekyun Seok wrote: > I might have misunderstood your comments. > > ...
6 years, 2 months ago (2014-10-17 19:28:37 UTC) #16
Jaekyun Seok (inactive)
PTAL. I updated EscapeExternalHandlerValue() to keep '#', '[', and ']' with some unittests for it. ...
6 years, 2 months ago (2014-10-20 04:50:30 UTC) #17
Jaekyun Seok (inactive)
Ping.
6 years, 2 months ago (2014-10-21 03:04:48 UTC) #18
Jaekyun Seok (inactive)
Asanka, could you please take a look at this change? I updated EscapeExternalHandlerValue as you ...
6 years, 2 months ago (2014-10-22 08:14:11 UTC) #19
asanka
Sorry about the delay. I'll review this momentarily.
6 years, 2 months ago (2014-10-22 22:51:40 UTC) #20
asanka
https://codereview.chromium.org/646333002/diff/140001/net/base/escape.cc File net/base/escape.cc (right): https://codereview.chromium.org/646333002/diff/140001/net/base/escape.cc#newcode302 net/base/escape.cc:302: // !'()*-._~#[] Why remove '%'? Shouldn't we escape a ...
6 years, 2 months ago (2014-10-23 07:20:04 UTC) #21
Jaekyun Seok (inactive)
PTAL. https://codereview.chromium.org/646333002/diff/140001/net/base/escape.cc File net/base/escape.cc (right): https://codereview.chromium.org/646333002/diff/140001/net/base/escape.cc#newcode302 net/base/escape.cc:302: // !'()*-._~#[] Yes. And so '%' should be ...
6 years, 1 month ago (2014-10-23 12:43:19 UTC) #22
asanka
lgtm https://codereview.chromium.org/646333002/diff/180001/net/base/escape_unittest.cc File net/base/escape_unittest.cc (right): https://codereview.chromium.org/646333002/diff/180001/net/base/escape_unittest.cc#newcode504 net/base/escape_unittest.cc:504: EscapeExternalHandlerValue("%8k,a%,%a,a%8")); I meant these to be separate tests ...
6 years, 1 month ago (2014-10-23 19:17:13 UTC) #23
Jaekyun Seok (inactive)
Really thanks for the long review and giving LGTM! https://codereview.chromium.org/646333002/diff/180001/net/base/escape_unittest.cc File net/base/escape_unittest.cc (right): https://codereview.chromium.org/646333002/diff/180001/net/base/escape_unittest.cc#newcode504 net/base/escape_unittest.cc:504: ...
6 years, 1 month ago (2014-10-24 00:01:47 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/646333002/200001
6 years, 1 month ago (2014-10-24 00:03:31 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:200001)
6 years, 1 month ago (2014-10-24 01:11:23 UTC) #27
commit-bot: I haz the power
6 years, 1 month ago (2014-10-24 01:12:01 UTC) #28
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/9e212e96140c2cfc9d259ef6ce620895d0e5a384
Cr-Commit-Position: refs/heads/master@{#301013}

Powered by Google App Engine
This is Rietveld 408576698