brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.01k stars 2.21k forks source link

github.com/ipfs/kubo/issues/ is redirected to ipfs://kubo/issues #28171

Open markg85 opened 1 year ago

markg85 commented 1 year ago

Description

It looks like brave thinks URL's with /ipfs/ in it are IPFS urls. That's not really correct. I noticed this on https://github.com/ipfs/ where i was redirected to ipfs://... which then doesn't work at all.

I currently just disabled ipfs completely as this url detection makes it hard for me to visit github as ipfs dev..

Steps to Reproduce

  1. Enable IPFS
  2. Go to https://github.com/ipfs/kubo/issues/
  3. You're now redirected to ipfs://kubo/issues

If you disable IPFS you can see brave "thinks" that github page is an ipfs page: image

Actual result:

Brave redirects to ipfs://... on pages that aren't IPFS.

Expected result:

Don't redirect! Don't even detect IPFS in this page.

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

1.47.186 Chromium: 109.0.5414.119 (Official Build) (64-bit)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

lidel commented 1 year ago

cc @cypt4 – this sounds like an easy fix, hide "IPFS" button if /ipfs/cid is not a valid CID.

We need to be smarter about /ipns/ too, hide the button if id from /ipns/id is not a valid CID or DNSLink (or at least DNS name).