Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Ensure chrome intent URIs, other unknown protocols embeded in pages, don't result in "Unknown protocol" pages #3019

Open
mcomella opened this issue Jul 22, 2020 · 2 comments
Labels
chore Task to improve tooling, do something not product/user facing

Comments

@mcomella
Copy link
Contributor

Chrome intent URIs allow pages to open apps using URIs (e.g. <a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>. A intuitive behavior for our developers is to show an error when seeing a protocol we can't handle. However, in my experience, some pages will try to open an intent Uri and fallback to a web page if the app is not available:

load(intentUri)
setTimeout(5000, {
  if (intentUriNotLoaded) {
    load(fallbackUrl)
  }
})

In the naive implementation, this will send the user to an "Unknown protocol" page. Even if we don't fully support the chrome intent URIs, we should ensure we don't do the wrong thing.

Note: later versions of a-c may get us this for free.

@mcomella mcomella added the chore Task to improve tooling, do something not product/user facing label Jul 22, 2020
@mcomella
Copy link
Contributor Author

My test page might be helpful here: http://mcomella.xyz/test/uri.html I think we should take no action when these links are clicked. If "Unknown protocol" shows up, we're probably doing the wrong thing but look at Chrome – we should follow their behavior (reasoning: even though I feel it's less correct, too many sites rely on Chrome's behavior so we must copy it).

@mcomella
Copy link
Contributor Author

I confirmed that we have the "Unknown protocol behavior" both on master 4.7.1 and prior to 4.7 (i.e. this is not a regression). Fenix has the correct behavior so upgrading a-c is likely to address the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chore Task to improve tooling, do something not product/user facing
Projects
None yet
Development

No branches or pull requests

1 participant