Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(3)

Issue 1171223004: Sanitize SVG animation attributes which could set JavaScript URL values. (Closed)

Created:
4 years, 10 months ago by dominicc (has gone to gerrit)
Modified:
4 years, 10 months ago
Reviewers:
Tom Sepez, dcheng, ojan
CC:
dcheng, darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, krit, eae+blinkwatch, Eric Willigers, f(malita), fs, groby+blinkspell_chromium.org, gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans, sof
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Sanitize SVG animation attributes which could set JavaScript URL values. When pasting we remove the hrefs from links with javascript: URLs (among other things) because the scripts may be malicious. But SVG animations can update hrefs indirectly, and we were not scrutinizing those. This extends the sanitization to remove attributes from SVG animations that contain JavaScript URLs because the animation could be directed to set a href. BUG=452059 TEST=webkit_unit_tests UnsafeSVGAttributeSanitizationTest.* Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197006

Patch Set 1 #

Total comments: 8

Patch Set 2 : Thanks for feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+349 lines, -5 lines) Patch
M Source/core/core.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Element.h View 1 3 chunks +4 lines, -2 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 chunks +8 lines, -2 lines 0 comments Download
M Source/core/editing/Editor.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/svg/SVGAnimateElement.h View 3 chunks +5 lines, -0 lines 0 comments Download
M Source/core/svg/SVGAnimateElement.cpp View 1 1 chunk +20 lines, -0 lines 0 comments Download
M Source/core/svg/SVGAnimationElement.h View 2 chunks +8 lines, -0 lines 0 comments Download
M Source/core/svg/SVGAnimationElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
A Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp View 1 1 chunk +301 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
dominicc (has gone to gerrit)
PTAL
4 years, 10 months ago (2015-06-10 08:54:39 UTC) #2
dcheng
https://codereview.chromium.org/1171223004/diff/1/Source/core/clipboard/Pasteboard.h File Source/core/clipboard/Pasteboard.h (right): https://codereview.chromium.org/1171223004/diff/1/Source/core/clipboard/Pasteboard.h#newcode49 Source/core/clipboard/Pasteboard.h:49: Pasteboard(); Can we just use Pasteboard::generalPasteboard() in the unit ...
4 years, 10 months ago (2015-06-10 09:35:28 UTC) #4
Tom Sepez
lgtm https://codereview.chromium.org/1171223004/diff/1/Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp File Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp (right): https://codereview.chromium.org/1171223004/diff/1/Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp#newcode75 Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp:75: const char* unsafeContent = On 2015/06/10 09:35:28, dcheng ...
4 years, 10 months ago (2015-06-10 17:29:02 UTC) #5
dominicc (has gone to gerrit)
Thanks for the useful feedback, PTAL. Summary of what's changed: - Test inputs are static ...
4 years, 10 months ago (2015-06-12 06:05:19 UTC) #6
dcheng
lgtm
4 years, 10 months ago (2015-06-12 06:46:11 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1171223004/20001
4 years, 10 months ago (2015-06-12 06:46:26 UTC) #10
commit-bot: I haz the power
4 years, 10 months ago (2015-06-12 07:13:45 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197006

Powered by Google App Engine
This is Rietveld 408576698