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

Issue 1512013: Improve JsonDoubleQuoteT to do script escapes (Closed)

Created:
10 years, 8 months ago by inferno
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Improve the underlying escaping function JsonDoubleQuoteT to escape < and > characters BY DEFAULT to prevent script execution. BUG=40147 TEST=StringEscapeTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=43695

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -6 lines) Patch
M base/json/string_escape.cc View 8 9 10 1 chunk +4 lines, -3 lines 1 comment Download
M base/json/string_escape_unittest.cc View 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/json_value_serializer_unittest.cc View 9 1 chunk +2 lines, -2 lines 0 comments Download
M net/base/dir_header.html View 1 2 3 4 5 6 7 10 1 chunk +2 lines, -1 line 1 comment Download

Messages

Total messages: 15 (0 generated)
inferno
simple fix, but took a little more time to come up with a nice presentable ...
10 years, 8 months ago (2010-04-02 03:47:52 UTC) #1
inferno
added a unit test case. fixed existing ones. changed from escapepath to urlescape since it ...
10 years, 8 months ago (2010-04-02 04:58:27 UTC) #2
inferno
url escape also escaped + which we dont want as it is not unescaped by ...
10 years, 8 months ago (2010-04-02 05:07:22 UTC) #3
jschuh
SGTM, but I'm not familiar with this code. Chris, you mind singing off before commit?
10 years, 8 months ago (2010-04-02 17:53:23 UTC) #4
cevans
On Fri, Apr 2, 2010 at 10:53 AM, <jschuh@chromium.org> wrote: > SGTM, but I'm not ...
10 years, 8 months ago (2010-04-02 17:55:46 UTC) #5
inferno
Including Eric for review.
10 years, 8 months ago (2010-04-02 17:57:00 UTC) #6
eroman
I think it would be better to push the fix into the base library function ...
10 years, 8 months ago (2010-04-03 00:50:24 UTC) #7
inferno
That is a great suggestion Eric. I will work on doing that.
10 years, 8 months ago (2010-04-03 01:18:36 UTC) #8
inferno
Hi Eric, I have implemented the suggested solution. Please review. 1. added a boolean flag ...
10 years, 8 months ago (2010-04-05 03:32:22 UTC) #9
cevans
On Sun, Apr 4, 2010 at 8:32 PM, <inferno@chromium.org> wrote: > Hi Eric, > > ...
10 years, 8 months ago (2010-04-05 04:30:57 UTC) #10
Peter Kasting
On 2010/04/05 04:30:57, cevans_google.com wrote: > - Do we expose JSON as an external-to-Chromium interface ...
10 years, 8 months ago (2010-04-05 04:48:49 UTC) #11
Peter Kasting
On 2010/04/05 03:32:22, inferno wrote: > 2. Did not modify JsonDoubleQuote Function since it is ...
10 years, 8 months ago (2010-04-05 04:50:12 UTC) #12
inferno
Thanks a lot Chris and Peter. I have now enabled Script escaping < > for ...
10 years, 8 months ago (2010-04-05 05:25:22 UTC) #13
eroman
lgtm. I can't imagine this causing any problems... but if it does, then that is ...
10 years, 8 months ago (2010-04-06 01:43:11 UTC) #14
inferno
10 years, 8 months ago (2010-04-06 03:45:10 UTC) #15
Thanks Eric. i did as you recommended and committed in two seperate cls.

Powered by Google App Engine
This is Rietveld 408576698