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

Issue 1084473003: Make HtmlEscape escape '/' again in UNKNOWN mode. (Closed)

Created:
5 years, 8 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 8 months ago
CC:
reviews_dartlang.org, kevmoo
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Make HtmlEscape escape '/' again in UNKNOWN mode. This is a XSS-prevention recommendation. If escaped code is only ever used inside a quoted attribute or as element text, escapeing '/' is not necessary. However, if the escaped code is inserted inside a tag (for example assuming that it is a well-behavde attribute), then a slash may be meaningful in some cases. Lots of other things can go wrong in that case, so we recommend against it. R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=45153

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -13 lines) Patch
M sdk/lib/convert/html_escape.dart View 8 chunks +42 lines, -9 lines 2 comments Download
M tests/lib/convert/html_escape_test.dart View 2 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Lasse Reichstein Nielsen
5 years, 8 months ago (2015-04-15 07:48:58 UTC) #2
Søren Gjesse
lgtm
5 years, 8 months ago (2015-04-15 07:55:59 UTC) #3
Lasse Reichstein Nielsen
Committed patchset #1 (id:1) manually as 45153 (presubmit successful).
5 years, 8 months ago (2015-04-15 08:15:21 UTC) #4
Siggi Cherem (dart-lang)
https://codereview.chromium.org/1084473003/diff/1/sdk/lib/convert/html_escape.dart File sdk/lib/convert/html_escape.dart (right): https://codereview.chromium.org/1084473003/diff/1/sdk/lib/convert/html_escape.dart#newcode185 sdk/lib/convert/html_escape.dart:185: case '/': if (mode.escapeSlash) replacement = '.'; break; should ...
5 years, 8 months ago (2015-04-15 22:09:52 UTC) #6
Lasse Reichstein Nielsen
5 years, 8 months ago (2015-04-16 06:42:22 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1084473003/diff/1/sdk/lib/convert/html_escape...
File sdk/lib/convert/html_escape.dart (right):

https://codereview.chromium.org/1084473003/diff/1/sdk/lib/convert/html_escape...
sdk/lib/convert/html_escape.dart:185: case '/': if (mode.escapeSlash)
replacement = '.'; break;
Argh. Yes, ofcourse.

Powered by Google App Engine
This is Rietveld 408576698