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

Issue 338193002: Refactor XSS Auditor string operations. (Closed)

Created:
6 years, 6 months ago by Tom Sepez
Modified:
6 years, 6 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, blink-reviews-html_chromium.org, dglazkov+blink
Project:
blink
Visibility:
Public.

Description

This change is a precursor to tackling some more difficult cases where we need to apply the string manipulations to strings obtained in a more general manner. The function cannonicalize() now becomes a method of XSSAuditor, and is the main entry point for performing all such operations. Other methods are renamed to refer to canconicalized strings. In order to apply this everywhere, canonicalize() needs to know whether any truncation is to be applied at all (e.g. we're processing the request URL or post body and must use it all), so introduce a new enum constant for this case. Rename the enum while we're at it to indicate its close relationship to truncation. Having done this, several methods can now become functions for truncating strings. I also removed some indentation from eraseAttributeIfInjected(). Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176339

Patch Set 1 #

Patch Set 2 : rename. #

Patch Set 3 : nameFromAttribute() not needed until next CL lands. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -104 lines) Patch
M Source/core/html/parser/XSSAuditor.h View 1 2 2 chunks +10 lines, -9 lines 0 comments Download
M Source/core/html/parser/XSSAuditor.cpp View 1 2 17 chunks +112 lines, -95 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Tom Sepez
Adam, please review.
6 years, 6 months ago (2014-06-16 18:47:49 UTC) #1
abarth-chromium
lgtm
6 years, 6 months ago (2014-06-16 22:41:43 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/338193002/40001
6 years, 6 months ago (2014-06-16 22:42:07 UTC) #3
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-17 00:26:30 UTC) #4
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/11563)
6 years, 6 months ago (2014-06-17 00:26:31 UTC) #5
Tom Sepez
The CQ bit was checked by tsepez@chromium.org
6 years, 6 months ago (2014-06-17 16:52:13 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/338193002/40001
6 years, 6 months ago (2014-06-17 16:52:40 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-17 17:24:28 UTC) #8
Message was sent while issue was closed.
Change committed as 176339

Powered by Google App Engine
This is Rietveld 408576698