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

Unified Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 1146753004: Sanitization should reject elements that we can't examine (e.g. embed/object on FF) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Review fixes Created 5 years, 7 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 | « tools/dom/src/Validators.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 10f842c74ff0f1de135bd9c53c130572f033a31a..f5b165be4a4666d79a7bff1eefa9583d5d6889bd 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -1392,7 +1392,7 @@ $endif
* Those attributes are: attributes, lastChild, children, previousNode and tagName.
*/
$if DART2JS
- bool get _hasCorruptedAttributes {
+ static bool _hasCorruptedAttributes(Element element) {
return JS('bool', r'''
(function(element) {
if (!(element.attributes instanceof NamedNodeMap)) {
@@ -1410,11 +1410,11 @@ $if DART2JS
}
}
return false;
- })(#)''', this);
+ })(#)''', element);
}
$else
// Dartium isn't affected by these attacks, because it goes directly to the C++ API.
- bool get _hasCorruptedAttributes => false;
+ static bool _hasCorruptedAttributes(Element element) => false;
Alan Knight 2015/05/21 20:38:41 Made this static, as suggested.
$endif
$if DART2JS
« no previous file with comments | « tools/dom/src/Validators.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698