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

Issue 643963004: Unescape BiDi control chars while parsing data urls (Closed)

Created:
6 years, 2 months ago by meacer
Modified:
6 years, 2 months ago
Reviewers:
Tom Sepez, msw, brettw, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Unescape BiDi control chars while parsing data: urls The fix for bug 337746 prevented unescaping of BiDi control characters in URLs. This breaks the loading of data: URLs because BiDi control chars appear escaped in the loaded HTML. This patch adds a special case for the parsing of BiDi control chars. This shouldn't change the way URLs are shown in the omnibox or any other UI. URLs with BiDi control characters are always displayed as escaped in the omnibox. This behavior is also consistent with Firefox. BUG=423901 Committed: https://crrev.com/c62e2eeb225afbc123db27c2d3500a7bbbab6a48 Cr-Commit-Position: refs/heads/master@{#300584}

Patch Set 1 #

Patch Set 2 : Fix build #

Patch Set 3 : Add a browsertest #

Total comments: 22

Patch Set 4 : mmenke and tsepez comments #

Patch Set 5 : Fix test comment #

Total comments: 4

Patch Set 6 : Inline IsLastTwoBytesofThreeByteBidiControlChar #

Total comments: 6

Patch Set 7 : Remove BIDI_CONTROL_CHARS flag #

Total comments: 2

Patch Set 8 : Fix comment and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -259 lines) Patch
M chrome/browser/ui/browser_navigator_browsertest.cc View 1 2 3 4 5 6 7 31 chunks +273 lines, -236 lines 0 comments Download
M net/base/data_url_unittest.cc View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
M net/base/escape.h View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M net/base/escape.cc View 1 2 3 4 5 6 7 2 chunks +53 lines, -21 lines 0 comments Download
M net/base/escape_unittest.cc View 1 2 3 4 5 6 2 chunks +27 lines, -1 line 0 comments Download

Messages

Total messages: 29 (6 generated)
meacer
Matt, since you commented on the bug, do you mind taking a look? :) Thanks!
6 years, 2 months ago (2014-10-16 23:42:55 UTC) #2
mmenke
On 2014/10/16 23:42:55, Mustafa Emre Acer wrote: > Matt, since you commented on the bug, ...
6 years, 2 months ago (2014-10-16 23:55:32 UTC) #3
meacer
On 2014/10/16 23:55:32, mmenke wrote: > On 2014/10/16 23:42:55, Mustafa Emre Acer wrote: > > ...
6 years, 2 months ago (2014-10-17 00:00:26 UTC) #4
meacer
brettw for url related parts tsepez for security sanity check Could you please take a ...
6 years, 2 months ago (2014-10-17 00:04:22 UTC) #6
mmenke
This looks pretty reasonable - hadn't realized you were just going to do this when ...
6 years, 2 months ago (2014-10-17 15:24:44 UTC) #7
Tom Sepez
Nothing but nits. But be sure to get buy-in from Brett, he's brought up some ...
6 years, 2 months ago (2014-10-17 17:08:49 UTC) #8
meacer
https://codereview.chromium.org/643963004/diff/40001/chrome/browser/ui/browser_navigator_browsertest.cc File chrome/browser/ui/browser_navigator_browsertest.cc (right): https://codereview.chromium.org/643963004/diff/40001/chrome/browser/ui/browser_navigator_browsertest.cc#newcode1382 chrome/browser/ui/browser_navigator_browsertest.cc:1382: IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, On 2014/10/17 15:24:43, mmenke wrote: > Not sure ...
6 years, 2 months ago (2014-10-17 20:41:54 UTC) #9
Tom Sepez
lgtm
6 years, 2 months ago (2014-10-17 20:51:29 UTC) #10
mmenke
https://codereview.chromium.org/643963004/diff/80001/net/base/escape.cc File net/base/escape.cc (right): https://codereview.chromium.org/643963004/diff/80001/net/base/escape.cc#newcode140 net/base/escape.cc:140: unsigned char third_byte) { This function name is a ...
6 years, 2 months ago (2014-10-20 15:46:40 UTC) #11
meacer
https://codereview.chromium.org/643963004/diff/80001/net/base/escape.cc File net/base/escape.cc (right): https://codereview.chromium.org/643963004/diff/80001/net/base/escape.cc#newcode140 net/base/escape.cc:140: unsigned char third_byte) { On 2014/10/20 15:46:40, mmenke wrote: ...
6 years, 2 months ago (2014-10-20 17:23:26 UTC) #12
mmenke
LGTM, but should wait for brettw to weigh in.
6 years, 2 months ago (2014-10-20 17:51:09 UTC) #13
brettw
https://codereview.chromium.org/643963004/diff/100001/net/base/escape.cc File net/base/escape.cc (right): https://codereview.chromium.org/643963004/diff/100001/net/base/escape.cc#newcode214 net/base/escape.cc:214: // However, escaping these characters in data: urls result ...
6 years, 2 months ago (2014-10-20 18:04:42 UTC) #14
meacer
https://codereview.chromium.org/643963004/diff/100001/net/base/escape.cc File net/base/escape.cc (right): https://codereview.chromium.org/643963004/diff/100001/net/base/escape.cc#newcode214 net/base/escape.cc:214: // However, escaping these characters in data: urls result ...
6 years, 2 months ago (2014-10-20 22:54:22 UTC) #15
brettw
LGTM, I didn't check the low-level logic.
6 years, 2 months ago (2014-10-21 06:11:16 UTC) #16
mmenke
On 2014/10/21 06:11:16, brettw wrote: > LGTM, I didn't check the low-level logic. I did ...
6 years, 2 months ago (2014-10-21 14:24:50 UTC) #17
meacer
msw, can you please OWNERS review chrome/browser/ui/browser_navigator_browsertest.cc?
6 years, 2 months ago (2014-10-21 17:06:56 UTC) #19
msw
c/b/ui lgtm with a comment nit. https://codereview.chromium.org/643963004/diff/120001/chrome/browser/ui/browser_navigator_browsertest.cc File chrome/browser/ui/browser_navigator_browsertest.cc (right): https://codereview.chromium.org/643963004/diff/120001/chrome/browser/ui/browser_navigator_browsertest.cc#newcode1383 chrome/browser/ui/browser_navigator_browsertest.cc:1383: // escaped in ...
6 years, 2 months ago (2014-10-21 19:19:24 UTC) #20
meacer
Thanks all. https://codereview.chromium.org/643963004/diff/120001/chrome/browser/ui/browser_navigator_browsertest.cc File chrome/browser/ui/browser_navigator_browsertest.cc (right): https://codereview.chromium.org/643963004/diff/120001/chrome/browser/ui/browser_navigator_browsertest.cc#newcode1383 chrome/browser/ui/browser_navigator_browsertest.cc:1383: // escaped in the URL but they ...
6 years, 2 months ago (2014-10-21 19:56:02 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/643963004/140001
6 years, 2 months ago (2014-10-21 19:58:21 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/27824)
6 years, 2 months ago (2014-10-21 22:07:51 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/643963004/140001
6 years, 2 months ago (2014-10-21 22:11:24 UTC) #27
commit-bot: I haz the power
Committed patchset #8 (id:140001)
6 years, 2 months ago (2014-10-22 00:45:01 UTC) #28
commit-bot: I haz the power
6 years, 2 months ago (2014-10-22 04:04:16 UTC) #29
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/c62e2eeb225afbc123db27c2d3500a7bbbab6a48
Cr-Commit-Position: refs/heads/master@{#300584}

Powered by Google App Engine
This is Rietveld 408576698