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

Issue 1335083004: [Extensions] Don't allow extensions to inject scripts into extension pages (Closed)

Created:
5 years, 3 months ago by Devlin
Modified:
5 years, 3 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Don't allow extensions to inject scripts into extension pages Don't allow extensions to inject scripts into other extension pages, since this is a security risk. This was meant to be addressed, but there was an incorrect early-return. Also add a regression test. BUG=529682 Committed: https://crrev.com/c318b93de2ee7b8cc78e506dd2dd161af7d6819d Cr-Commit-Position: refs/heads/master@{#348707}

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -65 lines) Patch
M chrome/browser/extensions/content_script_apitest.cc View 1 chunk +18 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/content_scripts/background_page_iframe/background.html View 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/background_page_iframe/background.js View 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/background_page_iframe/manifest.json View 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/content_scripts/script_a_com/manifest.json View 1 chunk +12 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/content_scripts/script_a_com/script.js View 1 chunk +5 lines, -6 lines 0 comments Download
M extensions/renderer/extension_injection_host.cc View 2 chunks +11 lines, -7 lines 0 comments Download
M extensions/renderer/script_injection.h View 1 2 chunks +1 line, -5 lines 0 comments Download
M extensions/renderer/script_injection.cc View 1 3 chunks +4 lines, -12 lines 0 comments Download
M extensions/renderer/script_injection_manager.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M extensions/renderer/user_script_injector.cc View 1 1 chunk +30 lines, -30 lines 0 comments Download
M extensions/renderer/user_script_set.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
Devlin
fix + test
5 years, 3 months ago (2015-09-11 22:00:53 UTC) #2
not at google - send to devlin
https://codereview.chromium.org/1335083004/diff/1/extensions/renderer/extension_injection_host.cc File extensions/renderer/extension_injection_host.cc (right): https://codereview.chromium.org/1335083004/diff/1/extensions/renderer/extension_injection_host.cc#newcode83 extensions/renderer/extension_injection_host.cc:83: // outside of tabs because there is nowhere to ...
5 years, 3 months ago (2015-09-11 22:46:39 UTC) #3
Devlin
https://codereview.chromium.org/1335083004/diff/1/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/1335083004/diff/1/extensions/renderer/script_injection.cc#newcode143 extensions/renderer/script_injection.cc:143: SendInjectionMessage(true /* request permission */); On 2015/09/11 22:46:39, kalman ...
5 years, 3 months ago (2015-09-11 22:55:02 UTC) #4
not at google - send to devlin
lgtm https://codereview.chromium.org/1335083004/diff/1/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/1335083004/diff/1/extensions/renderer/script_injection.cc#newcode143 extensions/renderer/script_injection.cc:143: SendInjectionMessage(true /* request permission */); On 2015/09/11 22:55:02, ...
5 years, 3 months ago (2015-09-11 23:09:49 UTC) #5
Devlin
On 2015/09/11 23:09:49, kalman wrote: > lgtm > > https://codereview.chromium.org/1335083004/diff/1/extensions/renderer/script_injection.cc > File extensions/renderer/script_injection.cc (right): > ...
5 years, 3 months ago (2015-09-11 23:11:02 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1335083004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1335083004/1
5 years, 3 months ago (2015-09-11 23:11:24 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/112634)
5 years, 3 months ago (2015-09-11 23:58:33 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1335083004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1335083004/40001
5 years, 3 months ago (2015-09-14 19:49:47 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:40001)
5 years, 3 months ago (2015-09-14 20:22:37 UTC) #15
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/c318b93de2ee7b8cc78e506dd2dd161af7d6819d Cr-Commit-Position: refs/heads/master@{#348707}
5 years, 3 months ago (2015-09-14 20:23:15 UTC) #16
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:36:46 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c318b93de2ee7b8cc78e506dd2dd161af7d6819d
Cr-Commit-Position: refs/heads/master@{#348707}

Powered by Google App Engine
This is Rietveld 408576698