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

Issue 408873004: Fix for cross-origin video check for webgl on android (Closed)

Created:
6 years, 5 months ago by qinmin
Modified:
6 years, 4 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, avayvod+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, jschuh, Robert Sesek, abarth-chromium
Project:
chromium
Visibility:
Public.

Description

Fix for cross-origin video check for webgl We landed a hack earlier to treat all video urls as cross-origin for an security issue. That fix, however, breaks all webgl tests that has video in it. This CL brings a proper fix to the original issue. It uses a new API available in the android L preview System image. For systems below K, the security impact is much less serious than the issue it caused. As a result, we are reenabling video for webgl for systems <=K. And the security issues on these systems should be resolved when devices upgrade. BUG=358198 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288242

Patch Set 1 #

Total comments: 1

Patch Set 2 : pass allow_credentials to android mediaplayer #

Total comments: 2

Patch Set 3 : addressing kbr's comments #

Total comments: 15

Patch Set 4 : fix comments #

Patch Set 5 : don't allow android mediaplayer to do any redirects after passing the final destination #

Patch Set 6 : rebase #

Patch Set 7 : rebase again after WMPA changes #

Patch Set 8 : fix clang warnings #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -34 lines) Patch
M content/browser/media/android/browser_media_player_manager.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M content/common/media/media_player_messages_android.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/android/media_info_loader.h View 1 2 4 chunks +9 lines, -5 lines 0 comments Download
M content/renderer/media/android/media_info_loader.cc View 1 2 5 chunks +10 lines, -2 lines 0 comments Download
M content/renderer/media/android/media_info_loader_unittest.cc View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/media/android/renderer_media_player_manager.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/android/renderer_media_player_manager.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.h View 1 2 3 4 5 2 chunks +11 lines, -2 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 2 3 4 5 6 9 chunks +34 lines, -16 lines 2 comments Download
M media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M media/base/android/media_player_bridge.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M media/base/android/media_player_bridge.cc View 1 2 3 4 5 3 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 51 (0 generated)
qinmin
PTAL
6 years, 5 months ago (2014-07-21 22:39:26 UTC) #1
Ken Russell (switch to Gerrit)
I'd really like to see a version of this CL landed soon, but we need ...
6 years, 5 months ago (2014-07-22 01:44:20 UTC) #2
palmer
lgtm https://codereview.chromium.org/408873004/diff/20001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (left): https://codereview.chromium.org/408873004/diff/20001/content/renderer/media/android/webmediaplayer_android.cc#oldcode234 content/renderer/media/android/webmediaplayer_android.cc:234: // Check http://crbug.com/334204. We should retain this comment, ...
6 years, 5 months ago (2014-07-22 19:19:47 UTC) #3
Ken Russell (switch to Gerrit)
Notes on this fix per offline discussion: 1) Need to rebase to top of tree. ...
6 years, 4 months ago (2014-07-29 22:45:47 UTC) #4
scherkus (not reviewing)
On 2014/07/29 22:45:47, Ken Russell wrote: > Notes on this fix per offline discussion: > ...
6 years, 4 months ago (2014-07-29 23:15:49 UTC) #5
Ken Russell (switch to Gerrit)
On 2014/07/29 23:15:49, scherkus wrote: > On 2014/07/29 22:45:47, Ken Russell wrote: > > Notes ...
6 years, 4 months ago (2014-07-29 23:30:37 UTC) #6
qinmin
rebased to the top of the tree. Changed the CL according to suggestions 1-4 from ...
6 years, 4 months ago (2014-07-30 03:12:02 UTC) #7
Ken Russell (switch to Gerrit)
This looks like a good step forward. Multiple tests are needed: - Manual testing with ...
6 years, 4 months ago (2014-07-30 20:44:06 UTC) #8
qinmin
Andrew, since you are the author of buffered_resource_loader.cc, would you please take a look at ...
6 years, 4 months ago (2014-07-30 23:46:05 UTC) #9
palmer
It sounds from kbr's questions that this solution might be too restrictive in certain circumstances. ...
6 years, 4 months ago (2014-07-31 00:06:48 UTC) #10
scherkus (not reviewing)
https://codereview.chromium.org/408873004/diff/40001/content/renderer/media/android/media_info_loader.cc File content/renderer/media/android/media_info_loader.cc (right): https://codereview.chromium.org/408873004/diff/40001/content/renderer/media/android/media_info_loader.cc#newcode98 content/renderer/media/android/media_info_loader.cc:98: single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin(); On 2014/07/30 23:46:05, qinmin ...
6 years, 4 months ago (2014-07-31 01:15:46 UTC) #11
qinmin
ok, I was able to get the layout test running locally: before patching my CL, ...
6 years, 4 months ago (2014-07-31 01:52:59 UTC) #12
Sami
Thanks for for working on this Min! Could you also please re-enable the disabled video ...
6 years, 4 months ago (2014-08-04 14:54:16 UTC) #13
Ken Russell (switch to Gerrit)
Min: please post your results of testing various video sites with this patch. Sami: Min ...
6 years, 4 months ago (2014-08-06 21:46:50 UTC) #14
qinmin
Here is a list of websites i tested with my patch, and i found no ...
6 years, 4 months ago (2014-08-06 21:55:54 UTC) #15
Ken Russell (switch to Gerrit)
LGTM There are further issues to be fixed in this area of the code -- ...
6 years, 4 months ago (2014-08-06 22:41:34 UTC) #16
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 4 months ago (2014-08-06 22:43:55 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/408873004/70001
6 years, 4 months ago (2014-08-06 22:46:09 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-07 00:42:04 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-07 00:45:39 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/49080) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/38327) android_aosp ...
6 years, 4 months ago (2014-08-07 00:45:40 UTC) #21
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 4 months ago (2014-08-07 02:29:26 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/408873004/90001
6 years, 4 months ago (2014-08-07 02:31:00 UTC) #23
qinmin
The CQ bit was unchecked by qinmin@chromium.org
6 years, 4 months ago (2014-08-07 02:52:16 UTC) #24
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 4 months ago (2014-08-07 17:40:04 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/408873004/110001
6 years, 4 months ago (2014-08-07 17:44:54 UTC) #26
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-07 18:02:36 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-07 18:15:39 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/49394) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/38647) win_gpu ...
6 years, 4 months ago (2014-08-07 18:15:42 UTC) #29
Ken Russell (switch to Gerrit)
Needs to be rebased.
6 years, 4 months ago (2014-08-07 20:32:14 UTC) #30
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 4 months ago (2014-08-07 21:38:29 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/408873004/130001
6 years, 4 months ago (2014-08-07 22:19:40 UTC) #32
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-08 05:07:57 UTC) #33
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-08 05:13:21 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg/builds/3932)
6 years, 4 months ago (2014-08-08 05:13:22 UTC) #35
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 4 months ago (2014-08-08 05:53:17 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/408873004/150001
6 years, 4 months ago (2014-08-08 05:56:07 UTC) #37
commit-bot: I haz the power
Change committed as 288242
6 years, 4 months ago (2014-08-08 08:00:55 UTC) #38
dshwang
https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc#newcode625 content/renderer/media/android/webmediaplayer_android.cc:625: kSDKVersionToSupportSecurityOriginCheck; This method allows SSO for systems >=L although ...
6 years, 4 months ago (2014-08-11 08:01:33 UTC) #39
qinmin
On 2014/08/11 08:01:33, dshwang wrote: > https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc > File content/renderer/media/android/webmediaplayer_android.cc (right): > > https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc#newcode625 > ...
6 years, 4 months ago (2014-08-11 14:05:10 UTC) #40
dshwang
On 2014/08/11 14:05:10, qinmin wrote: > On 2014/08/11 08:01:33, dshwang wrote: > > > https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc ...
6 years, 4 months ago (2014-08-11 15:53:06 UTC) #41
qinmin
On 2014/08/11 15:53:06, dshwang wrote: > On 2014/08/11 14:05:10, qinmin wrote: > > On 2014/08/11 ...
6 years, 4 months ago (2014-08-15 03:07:27 UTC) #42
qinmin
On 2014/08/11 15:53:06, dshwang wrote: > On 2014/08/11 14:05:10, qinmin wrote: > > On 2014/08/11 ...
6 years, 4 months ago (2014-08-15 03:07:30 UTC) #43
qinmin
On 2014/08/15 03:07:30, qinmin wrote: > On 2014/08/11 15:53:06, dshwang wrote: > > On 2014/08/11 ...
6 years, 4 months ago (2014-08-15 03:08:10 UTC) #44
qinmin
On 2014/08/15 03:08:10, qinmin wrote: > On 2014/08/15 03:07:30, qinmin wrote: > > On 2014/08/11 ...
6 years, 4 months ago (2014-08-15 03:09:53 UTC) #45
dshwang
https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc#newcode625 content/renderer/media/android/webmediaplayer_android.cc:625: kSDKVersionToSupportSecurityOriginCheck; > > Yes, the CL just make webGL ...
6 years, 4 months ago (2014-08-15 09:25:56 UTC) #46
qinmin
On 2014/08/15 09:25:56, dshwang wrote: > https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc > File content/renderer/media/android/webmediaplayer_android.cc (right): > > https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc#newcode625 > ...
6 years, 4 months ago (2014-08-15 14:15:29 UTC) #47
qinmin
On 2014/08/15 14:15:29, qinmin wrote: > On 2014/08/15 09:25:56, dshwang wrote: > > > https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/android/webmediaplayer_android.cc ...
6 years, 4 months ago (2014-08-15 14:17:26 UTC) #48
dshwang
On 2014/08/15 14:17:26, qinmin wrote: > On 2014/08/15 14:15:29, qinmin wrote: > > On 2014/08/15 ...
6 years, 4 months ago (2014-08-15 14:23:08 UTC) #49
qinmin
On 2014/08/15 14:23:08, dshwang wrote: > On 2014/08/15 14:17:26, qinmin wrote: > > On 2014/08/15 ...
6 years, 4 months ago (2014-08-15 15:17:11 UTC) #50
Ken Russell (switch to Gerrit)
6 years, 4 months ago (2014-08-15 20:52:17 UTC) #51
Message was sent while issue was closed.
On 2014/08/15 15:17:11, qinmin wrote:
> On 2014/08/15 14:23:08, dshwang wrote:
> > On 2014/08/15 14:17:26, qinmin wrote:
> > > On 2014/08/15 14:15:29, qinmin wrote:
> > > > On 2014/08/15 09:25:56, dshwang wrote:
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/...
> > > > > File content/renderer/media/android/webmediaplayer_android.cc (right):
> > > > > 
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/408873004/diff/150001/content/renderer/media/...
> > > > > content/renderer/media/android/webmediaplayer_android.cc:625:
> > > > > kSDKVersionToSupportSecurityOriginCheck;
> > > > > > 
> > > > > > Yes, the CL just make webGL less restricted on systems <K, so
websites
> > > have
> > > > a
> > > > > > work around with the security issue.
> > > > > 
> > > > > This CL makes WebGL more restricted on systems <K, not less
restricted,
> > > > because
> > > > > this line; return system >= L as hasSingleSecurityOrigin
> > > > > So there is not any difference for system <= K compared to
> before-this-CL
> > > > 
> > > > before this CL, video painting is totally disabled for webGL.
> > > 
> > > And with this CL, if allow_stored_credentials is false, we will return
true
> > for
> > > single origin check for devices <=K
> > 
> > Ok, thank you for answering.
> > I asked it because Android K is still in trouble to draw video on webgl.
e.g.
> > http://www.costoso.net/seau/hermitcrab.html
> 
> Yes, some pages will still fail because they don't allow anonymous access.
> You can try some samples on the Khronos webgl conformance test page, or
>
https://www.khronos.org/registry/webgl/sdk/tests/extra/tex-image-with-video-t...

The workaround to use crossOrigin="anonymous" in the video tag to re-enable
video uploads to WebGL is just that, a workaround. The Chrome implementation
still won't pass the WebGL conformance tests until the release after K, where
the new code path is taken.

Powered by Google App Engine
This is Rietveld 408576698