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

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
« 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: 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)
@@ -206,6 +206,13 @@
// chrome-extension: resources shouldn't trigger insecure content warnings.
WebString extension_scheme(ASCIIToUTF16(chrome::kExtensionScheme));
WebSecurityPolicy::registerURLSchemeAsSecure(extension_scheme);
+
+ // chrome: and chrome-extension: pages should not be accessible by
+ // bookmarklets or javascript: URLs typed in the omnibox.
+ WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(
+ chrome_ui_scheme);
+ WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(
+ extension_scheme);
Mihai Parparita -not on Chrome 2011/08/25 18:30:56 This also includes packaged apps, users might expe
}
void ChromeContentRendererClient::RenderViewCreated(RenderView* render_view) {
« 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