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

Unified Diff: chrome/browser/extensions/api/tabs/tabs.cc

Issue 10863002: Added check to prevent extensions from injecting scrips into other extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added test cases for self injection... and failed injection attempt Created 8 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/browser/extensions/api/tabs/tabs.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs.cc b/chrome/browser/extensions/api/tabs/tabs.cc
index 99d87491b30d6b2c735e7b617a2d8c0e09bc6b2e..6a7f83c51cc847003c1f02c6a90ad05620b3faf6 100644
--- a/chrome/browser/extensions/api/tabs/tabs.cc
+++ b/chrome/browser/extensions/api/tabs/tabs.cc
@@ -1307,7 +1307,11 @@ bool UpdateTabFunction::UpdateURLIfPresent(DictionaryValue* update_props,
// we need to check host permissions before allowing them.
if (url.SchemeIs(chrome::kJavaScriptScheme)) {
if (!GetExtension()->CanExecuteScriptOnPage(
- tab_contents_->web_contents()->GetURL(), tab_id, NULL, &error_)) {
+ tab_contents_->web_contents()->GetURL(),
+ tab_contents_->web_contents()->GetURL(),
+ tab_id,
+ NULL,
+ &error_)) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698