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

Unified Diff: Source/core/html/parser/XSSAuditor.h

Issue 644663003: Apply XSSAuditor to html5 import (i.e. <link rel="import">) tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove parameter name. Created 6 years, 2 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
Index: Source/core/html/parser/XSSAuditor.h
diff --git a/Source/core/html/parser/XSSAuditor.h b/Source/core/html/parser/XSSAuditor.h
index cd43163245591099154d920eef65c4e9251f8d2e..d4126ce0a61541a23c35c1c45676d2c9aa651da0 100644
--- a/Source/core/html/parser/XSSAuditor.h
+++ b/Source/core/html/parser/XSSAuditor.h
@@ -82,6 +82,11 @@ private:
ScriptLikeAttributeTruncation
};
+ enum HrefRestriction {
+ ProhibitSameOriginHref,
+ AllowSameOriginHref
+ };
+
bool filterStartToken(const FilterTokenRequest&);
void filterEndToken(const FilterTokenRequest&);
bool filterCharacterToken(const FilterTokenRequest&);
@@ -96,9 +101,10 @@ private:
bool filterFormToken(const FilterTokenRequest&);
bool filterInputToken(const FilterTokenRequest&);
bool filterButtonToken(const FilterTokenRequest&);
+ bool filterLinkToken(const FilterTokenRequest&);
bool eraseDangerousAttributesIfInjected(const FilterTokenRequest&);
- bool eraseAttributeIfInjected(const FilterTokenRequest&, const QualifiedName&, const String& replacementValue = String(), TruncationKind treatment = NormalAttributeTruncation);
+ bool eraseAttributeIfInjected(const FilterTokenRequest&, const QualifiedName&, const String& replacementValue = String(), TruncationKind = NormalAttributeTruncation, HrefRestriction = ProhibitSameOriginHref);
String canonicalizedSnippetForTagName(const FilterTokenRequest&);
String canonicalizedSnippetForJavaScript(const FilterTokenRequest&);
« no previous file with comments | « LayoutTests/http/tests/security/xssAuditor/resources/safe-html.html ('k') | Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698