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

Unified Diff: chrome/browser/extensions/extension_message_service.cc

Issue 119014: Add some browser-level checks to prohibit access to extension bindings by... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « chrome/browser/child_process_security_policy.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_message_service.cc
===================================================================
--- chrome/browser/extensions/extension_message_service.cc (revision 17323)
+++ chrome/browser/extensions/extension_message_service.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/singleton.h"
#include "base/stl_util-inl.h"
#include "base/values.h"
+#include "chrome/browser/child_process_security_policy.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/extensions/extension_view.h"
@@ -275,6 +276,12 @@
RenderProcessHost* renderer = RenderProcessHost::FromID(*pid);
if (!renderer)
continue;
+ if (!ChildProcessSecurityPolicy::GetInstance()->
+ HasExtensionBindings(*pid)) {
+ // Don't send browser-level events to unprivileged processes.
+ continue;
+ }
+
renderer->Send(new ViewMsg_ExtensionHandleEvent(event_name, event_args));
}
}
« no previous file with comments | « chrome/browser/child_process_security_policy.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698