ipfs / ipfs-companion

Browser extension that simplifies access to IPFS resources on the web
https://docs.ipfs.tech/install/ipfs-companion/
Creative Commons Zero v1.0 Universal
2.04k stars 323 forks source link

ipfs://example.com in Chromium should produce error #1316

Open lidel opened 5 months ago

lidel commented 5 months ago

Problem

Seems we have some magic in Chromium implementation of ipfs:// and ipns:// that makes ipfs://docs.ipfs.tech correctly redirect to /ipns/ namespace.

While this sounds like useful, it perpetuates incorrect URIs in the wild: I personally had to reach out to well-meaning authors of some blogposts in the community to fix ipfs//example.com into ipns://example.com because both work in Chromium with Companion, and its easy to miss one letter difference.

Solution

This is specific to Chrimium handling of ipfs://, which still the q= hijack hack described here

Produce intermediate error page which explains that ipfs:// should be only used for immutable identifiers and mutable pointers like cryptographic IPNS rcords and DNSLink domain names should use ipns://.

It should have big green button "Continue to ipns://example.com →" that allows user to get to the correct destination with minimal disruption.