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

Unified Diff: Source/core/svg/SVGAnimateElement.h

Issue 1171223004: Sanitize SVG animation attributes which could set JavaScript URL values. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Thanks for feedback. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/Editor.h ('k') | Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimateElement.h
diff --git a/Source/core/svg/SVGAnimateElement.h b/Source/core/svg/SVGAnimateElement.h
index 709333069a1dc0fb851c99f0a74bf9ec9300f6b5..ae1247c05ff311717c1ad8641c5773aad77acfb4 100644
--- a/Source/core/svg/SVGAnimateElement.h
+++ b/Source/core/svg/SVGAnimateElement.h
@@ -28,6 +28,7 @@
#include "core/svg/SVGAnimationElement.h"
#include "platform/heap/Handle.h"
#include "wtf/OwnPtr.h"
+#include <base/gtest_prod_util.h>
namespace blink {
@@ -41,6 +42,8 @@ public:
DECLARE_VIRTUAL_TRACE();
+ virtual bool isSVGAnimationAttributeSettingJavaScriptURL(const Attribute&) const override;
+
AnimatedPropertyType animatedPropertyType();
bool animatedPropertyTypeSupportsAddition();
@@ -63,6 +66,8 @@ protected:
virtual void setTargetElement(SVGElement*) override final;
virtual void setAttributeName(const QualifiedName&) override final;
+ FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, stringsShouldNotSupportAddition);
+
private:
void resetAnimatedPropertyType();
« no previous file with comments | « Source/core/editing/Editor.h ('k') | Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698