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

Issue 795703003: Don't auto allow access to media devices unless a the security origin of the requester is the same … (Closed)

Created:
5 years, 11 months ago by perkj_chrome
Modified:
5 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, miu+watch_chromium.org, posciak+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't auto allow access to media devices unless a the security origin of the requester is the same as its ancestors. This adds a field in MediaStreamRequest to verify that the security origin of the requester is the same as its ancestors. This field have to be set on the UI-thread and is therefore set just before sending the request to the UI. BUG=448378 TEST= please see bug report Committed: https://crrev.com/ac8f9263b91c2b8b5c5ae7aa71af34c46f50d22d Cr-Commit-Position: refs/heads/master@{#313904}

Patch Set 1 #

Patch Set 2 : Fix existing unittests. Added HasSameOrigin to FrameTreeNode #

Patch Set 3 : Fix browsertests #

Patch Set 4 : Fix win compile. #

Total comments: 4

Patch Set 5 : Addressed comments and removed unrelated changes. #

Patch Set 6 : Fix problem with that the ui_request_ was used for state updates. #

Total comments: 2

Patch Set 7 : Fixed nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -79 lines) Patch
M chrome/browser/media/media_stream_devices_controller.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 10 chunks +22 lines, -17 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_ui_proxy.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_ui_proxy.cc View 1 7 chunks +41 lines, -16 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc View 1 2 3 4 5 6 chunks +55 lines, -40 lines 0 comments Download
M content/public/common/media_stream_request.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M content/public/common/media_stream_request.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 22 (6 generated)
perkj_chrome
for discussion.
5 years, 11 months ago (2015-01-15 16:13:50 UTC) #2
perkj_chrome
On 2015/01/15 16:13:50, perkj wrote: > for discussion. ping
5 years, 11 months ago (2015-01-23 10:29:56 UTC) #3
tommi (sloooow) - chröme
the whole approach lg. can you ping me again after making the changes you mentioned ...
5 years, 11 months ago (2015-01-23 10:44:04 UTC) #4
perkj_chrome
https://codereview.chromium.org/795703003/diff/60001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/795703003/diff/60001/content/browser/renderer_host/media/media_stream_manager.cc#newcode299 content/browser/renderer_host/media/media_stream_manager.cc:299: bool HasUIRequest() const { return ui_request_.get() != NULL; } ...
5 years, 11 months ago (2015-01-26 13:43:39 UTC) #5
perkj_chrome
On 2015/01/26 13:43:39, perkj wrote: > https://codereview.chromium.org/795703003/diff/60001/content/browser/renderer_host/media/media_stream_manager.cc > File content/browser/renderer_host/media/media_stream_manager.cc (right): > > https://codereview.chromium.org/795703003/diff/60001/content/browser/renderer_host/media/media_stream_manager.cc#newcode299 > ...
5 years, 11 months ago (2015-01-26 15:13:09 UTC) #6
tommi (sloooow) - chröme
lgtm https://codereview.chromium.org/795703003/diff/100001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/795703003/diff/100001/chrome/browser/media/media_stream_devices_controller.cc#newcode503 chrome/browser/media/media_stream_devices_controller.cc:503: if (!request_.all_ancestors_have_same_origin) nit: Would it make sense to ...
5 years, 11 months ago (2015-01-27 21:07:14 UTC) #7
perkj_chrome
Hi Alex, can you take a look at the change in FrameTreeNode I made to ...
5 years, 10 months ago (2015-01-28 16:19:57 UTC) #9
alexmos
LGTM. Just a note that url::Origin::IsSameAs does not currently do the right thing for file:// ...
5 years, 10 months ago (2015-01-28 18:13:50 UTC) #10
tommi (sloooow) - chröme
On 2015/01/28 18:13:50, alexmos wrote: > LGTM. > > Just a note that url::Origin::IsSameAs does ...
5 years, 10 months ago (2015-01-28 18:19:09 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/795703003/100001
5 years, 10 months ago (2015-01-28 18:19:54 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/38937)
5 years, 10 months ago (2015-01-28 18:27:02 UTC) #15
perkj_chrome
Jochen, would you mind the content/public changes ?
5 years, 10 months ago (2015-01-28 20:28:34 UTC) #17
jochen (gone - plz use gerrit)
lgtm
5 years, 10 months ago (2015-01-29 15:22:15 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/795703003/120001
5 years, 10 months ago (2015-01-30 11:12:55 UTC) #20
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 10 months ago (2015-01-30 12:43:19 UTC) #21
commit-bot: I haz the power
5 years, 10 months ago (2015-01-30 12:44:06 UTC) #22
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/ac8f9263b91c2b8b5c5ae7aa71af34c46f50d22d
Cr-Commit-Position: refs/heads/master@{#313904}

Powered by Google App Engine
This is Rietveld 408576698