New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 673019 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug
Proj-VR
Proj-XR
Proj-XR-VR



Sign in to add a comment

Ignore Intent which has DAYDREAM_VR_EXTRA in Intent extra

Project Member Reported by bshe@chromium.org, Dec 9 2016

Issue description

run this command while your phone is connected:
adb shell am start -a "android.intent.action.VIEW" -d "https://www.android.com/" --ez "android.intent.extra.VR_LAUNCH" true

When promoted, select your canary Chrome. It will enter VR mode on a regular 2d page. This means potentially, any app can fire an Intent with the extra boolean set to trigger our browser to this state.

I think we should just remove the extra boolean check for now since we don't plan to include Chrome icon in Daydream Home yet.
 
That would work for now (removing the extra boolean check) - but what
happens when we do want to show up in Daydream Home?

Comment 2 by bshe@chromium.org, Dec 9 2016

We should enter ChromeVR I guess. I can also make it work that way (given the VrShell runtime flag is set, otherwise, we just ignore the VR bit in the intent).

Comment 3 by bshe@chromium.org, Dec 9 2016

hmm, it is tricker than I think. your canary needs to be on webvr page (like Brandon's example) before you fire the intent. if it was on a regular page, it will just go to Daydream home. Anyway, I will work on this next week.

Comment 4 by bshe@chromium.org, Dec 15 2016

It looks like the Intent sometimes open the page in browser but sometimes open the page in a Custom tab activity. Using this command should be able to reliably reproduce the issue: adb shell am start -a "android.intent.action.VIEW" -d "https://www.android.com/" --ez "android.intent.extra.VR_LAUNCH" true --ez "android.support.customtabs.extra.user_opt_out" true

There are two issues here:
1. android.intent.extra.VR_LAUNCH shouldn't be used to identify a VR intent. A real VR intent should always has a DAYDREAM_CATEGORY category in the intent.
2. If a VR intent passed Intent filter, vrdisplayactiviate event shouldn't be
fired if Chrome is about to open a new page(this is why we see a regular page splitted into stereo rendering view). This issue can be fixed later when we have
a design for incoming VrIntent. see https://bugs.chromium.org/p/chromium/issues/detail?id=670129

To this specific issue, do nothing should be the right solution. The fabricated intent should be filtered. I was wrong about that we should try to enter ChromeVR.

Comment 5 by sko...@chromium.org, Dec 15 2016

So this is a WontFix then?

Comment 6 by bshe@chromium.org, Dec 15 2016

My comment in #4 is probably misleading when I say "do nothing". :p
what I really mean is that Chrome should just ignore the VR bit information in the Intent, instead of try to enter VR mode. I have a fix ready for review soon.

Comment 7 by sko...@chromium.org, Dec 15 2016

Ah, I see; thanks.
Labels: Proj-VR-Daydream
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/203f0669b622c6425388c9d6fc7069dbbe451025

commit 203f0669b622c6425388c9d6fc7069dbbe451025
Author: bshe <bshe@chromium.org>
Date: Wed Dec 21 22:25:51 2016

Ignore VR_EXTRA boolean in incoming Intent

As explained in  crbug.com/673019  We should just use DAYDREAM category
to detect if an Intent is a DAYDREAM Intent.

BUG= 673019 

Review-Url: https://codereview.chromium.org/2580093003
Cr-Commit-Position: refs/heads/master@{#440242}

[modify] https://crrev.com/203f0669b622c6425388c9d6fc7069dbbe451025/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
[modify] https://crrev.com/203f0669b622c6425388c9d6fc7069dbbe451025/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Comment 10 by bshe@chromium.org, Dec 21 2016

Status: Fixed (was: Started)
We probably want to merge this into M56 if possible, so malicious apps can't get chrome into a weird state on stable.

Comment 12 by bshe@chromium.org, Dec 22 2016

yah. Merge to M56 is a growing pain at this point. This one is probably easy to merge. But I want to avoid merge unless it is security or stability related.

To trigger the strange state, the top page must be a webvr page which listen to a vrdisplayactivate event and request present in the event handler while the malicious app send the intent. Since WebVR is original trial only, I think it is relatively safe. And user can recover from the state easily. So M57 sounds reasonable.

Sign in to add a comment