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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1917073002: Block webpages from navigating to view-source URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 98cf865b75a289b5fca64e2702727de44238a902..9a4ce5a1648a1ee7a042a2428b4a736064de2702 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1325,6 +1325,10 @@ void RenderThreadImpl::RegisterSchemes() {
// chrome-devtools:
WebString devtools_scheme(base::ASCIIToUTF16(kChromeDevToolsScheme));
WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(devtools_scheme);
+
+ // view-source:
+ WebString view_source_scheme(base::ASCIIToUTF16(kViewSourceScheme));
+ WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(view_source_scheme);
Charlie Reis 2016/04/27 21:47:03 This seems to equate to SecurityOrigin::canDisplay
meacer 2016/05/12 01:14:16 Yes, it also prevents linking and navigation. I th
Charlie Reis 2016/05/16 22:22:18 Ah. Yes, that would be a good idea. Do you know
}
void RenderThreadImpl::NotifyTimezoneChange() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698