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

Unified Diff: third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: Created 4 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: third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp b/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp
index 165479ca8be105a7e08b2f7e75f93c4e740f0b0d..bb3b3eaf836f80fa8b406df81dd55aebff8824d6 100644
--- a/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp
+++ b/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp
@@ -359,6 +359,13 @@ void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate) {
if (DocumentLoader* documentLoader =
document->frame()->loader().documentLoader()) {
+ // We don't process error pages.
+ printf("XSSAuditor::init: '%s', '%s'\n", m_documentURL.getString().utf8().data(), documentLoader->unreachableURL().getString().utf8().data());
+ if (!documentLoader->unreachableURL().isEmpty()) {
+ m_isEnabled = false;
+ return;
+ }
+
const AtomicString& headerValue =
documentLoader->response().httpHeaderField(HTTPNames::X_XSS_Protection);
String errorDetails;

Powered by Google App Engine
This is Rietveld 408576698