TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.23k stars 3.03k forks source link

Fix intent-filter so that Invidious /authorize_token links are not opened in NewPipe #11032

Open iBicha opened 5 months ago

iBicha commented 5 months ago

Checklist

Affected version

0.27.0

Steps to reproduce the bug

  1. Ensure that NewPipe opens Invidious Links by default (deep linking) e.g. invidious.fdn.fr
  2. Open a link for authorizing a token (example)
    • For context, using Playlet you can scan a QR code that directs you to /authorize_token to get a token from Invidious
      1. NewPipe opens instead of the browser, and shows an empty "Content unavailable" page

Expected behavior

NewPipe should not handle /authorize_token links, and let the browser handle it

Actual behavior

NewPipe opens instead of the browser, and shows an empty "Content unavailable" page.

Screenshots/Screen recordings

No response

Logs

No response

Affected Android/Custom ROM version

No response

Affected device model

No response

Additional information

NewPipe should not open links that has /authorize_token in them. I don't know the latest with intent-filters, but if possible, it should handle only the links it can handle (e.g. playlists, videos, channels, etc) If this is not possible then NewPipe should handle the link and if it finds a /authorize_token it should redirect it back to the default handler/browser

opusforlife2 commented 5 months ago

All front-end URLs are declared in the manifest. I wonder if it can accommodate a denylist of subset paths.

iBicha commented 5 months ago

All front-end URLs are declared in the manifest. I wonder if it can accommodate a denylist of subset paths.

It looks like it's possible to specify a pathAdvancedPattern which can match the url against a regex. This definitely feels like it can solve it. https://developer.android.com/guide/topics/manifest/data-element#path

PS: to confirm, this is not a feature request, this is a bug that breaks Invidious user login

bug
opusforlife2 commented 5 months ago

A workaround is that you disable one specific URL from Newpipe's list and use that to authorise Invidious.