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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 7748022: Protect sensistive chrome: and chrome-extension: schemes as not being able to be manipulated by b... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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: chrome/renderer/chrome_content_renderer_client.cc
===================================================================
--- chrome/renderer/chrome_content_renderer_client.cc (revision 98255)
+++ chrome/renderer/chrome_content_renderer_client.cc (working copy)
@@ -203,6 +203,11 @@
WebString internal_scheme(ASCIIToUTF16(chrome::kChromeInternalScheme));
WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(internal_scheme);
+ // chrome: pages should not be accessible by bookmarklets or javascript:
+ // URLs typed in the omnibox.
+ WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(
+ chrome_ui_scheme);
+
// chrome-extension: resources shouldn't trigger insecure content warnings.
WebString extension_scheme(ASCIIToUTF16(chrome::kExtensionScheme));
WebSecurityPolicy::registerURLSchemeAsSecure(extension_scheme);

Powered by Google App Engine
This is Rietveld 408576698