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

Issue 10863002: Added check to prevent extensions from injecting scrips into other extensions (Closed)

Created:
8 years, 4 months ago by zel
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, levin
Visibility:
Public.

Description

Added check to prevent extensions from injecting scrips into pages hosted in iframe context of other extensions (other than itself). BUG=126257 TEST=ExtensionApiTest.ContentScriptOtherExtensions, added new checks to ExtensionScriptAndCaptureVisibleTest.Permissions Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152955

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : added test cases for self injection... and failed injection attempt #

Total comments: 8

Patch Set 5 : #

Total comments: 2

Patch Set 6 : rebase #

Patch Set 7 : added license comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -36 lines) Patch
M chrome/browser/extensions/active_tab_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tabs/execute_code_in_tab_function.cc View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/tabs/tabs.cc View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/content_script_apitest.cc View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 3 chunks +17 lines, -8 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 1 2 3 4 5 5 chunks +40 lines, -15 lines 0 comments Download
M chrome/renderer/extensions/user_script_scheduler.cc View 1 2 3 4 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/renderer/extensions/user_script_slave.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/iframe_content.html View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/iframe_content.js View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/injector/background.js View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/injector/inject.js View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/injector/manifest.json View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/injector/test.html View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/injector/test.js View 1 2 3 4 5 6 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/victim/background.js View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/victim/manifest.json View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/victim/test.html View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/other_extensions/victim/test.js View 1 2 3 4 5 6 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
zel
8 years, 4 months ago (2012-08-21 23:10:47 UTC) #1
abarth-chromium
This patch looks reasonable to me. You'll need to get an OWNER to sign off ...
8 years, 4 months ago (2012-08-22 00:54:19 UTC) #2
zel
https://chromiumcodereview.appspot.com/10863002/diff/7001/chrome/common/extensions/extension.h File chrome/common/extensions/extension.h (right): https://chromiumcodereview.appspot.com/10863002/diff/7001/chrome/common/extensions/extension.h#newcode535 chrome/common/extensions/extension.h:535: const GURL& top_frame_url, On 2012/08/22 00:54:19, abarth wrote: > ...
8 years, 4 months ago (2012-08-22 01:39:20 UTC) #3
Aaron Boodman
lgtm http://codereview.chromium.org/10863002/diff/8023/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/10863002/diff/8023/chrome/common/extensions/extension.cc#newcode3606 chrome/common/extensions/extension.cc:3606: !CanExecuteScriptEverywhere()) Braces required here.
8 years, 4 months ago (2012-08-23 00:45:59 UTC) #4
zel
http://codereview.chromium.org/10863002/diff/8023/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/10863002/diff/8023/chrome/common/extensions/extension.cc#newcode3606 chrome/common/extensions/extension.cc:3606: !CanExecuteScriptEverywhere()) On 2012/08/23 00:45:59, Aaron Boodman wrote: > Braces ...
8 years, 4 months ago (2012-08-23 01:28:29 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zelidrag@chromium.org/10863002/21001
8 years, 4 months ago (2012-08-23 01:28:58 UTC) #6
commit-bot: I haz the power
Presubmit check for 10863002-21001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-23 01:29:07 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zelidrag@chromium.org/10863002/22001
8 years, 4 months ago (2012-08-23 01:33:07 UTC) #8
commit-bot: I haz the power
Try job failure for 10863002-22001 (retry) on linux_rel for step "interactive_ui_tests". It's a second try, ...
8 years, 4 months ago (2012-08-23 03:07:28 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zelidrag@chromium.org/10863002/22001
8 years, 4 months ago (2012-08-23 03:16:43 UTC) #10
commit-bot: I haz the power
8 years, 4 months ago (2012-08-23 05:53:21 UTC) #11
Change committed as 152955

Powered by Google App Engine
This is Rietveld 408576698