Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs URI breaks URI syntax (RFC 3986) #13677

Closed
ingokeck opened this issue Jan 20, 2021 · 4 comments · Fixed by brave/brave-core#8112
Closed

ipfs URI breaks URI syntax (RFC 3986) #13677

ingokeck opened this issue Jan 20, 2021 · 4 comments · Fixed by brave/brave-core#8112
Assignees

Comments

@ingokeck
Copy link

Description

The IPFS URIs in Brave do not follow the correct syntax as given in the URI standard RFC 3986 (https://tools.ietf.org/html/rfc3986#section-3). Instead of using the correct format of ipfs:ipfshash, Brave requires 'ipfs://', which according to RFC 3986 represents an authority, i.e. a dedicated instance of an IPFS service provider. This will break compatibility with all software that handles URI correctly.

1. Steps to Reproduce

  1. Activate IPFS support in Brave
  2. type 'ipfs:QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme' into URL bar
  3. press return

Actual result:

Error message that the website is not availabe with Error: ERR_UNKNOWN_URL_SCHEME

Expected result:

Page with "Hello and Welcome to IPFS!..."

2. Steps to Reproduce

  1. Activate IPFS support in Brave
  2. type 'ipfs://QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme' into URL bar
  3. press return

Actual result:

Page with "Hello and Welcome to IPFS!..."

Expected result:

Error message that not IPFS instance of the name QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG could be reached, or that QmY is not a valid identifier of an IPFS instance but looks like an IPFS hash and that the user may mean 'ipfs:QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme' instead.

Reproduces how often:

Every time

Brave version (brave://version info)

Brave 1.19.86 Chromium: 88.0.4324.96 (Offizieller Build) (64-Bit)
Revision: 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS: Linux

Version/Channel Information:

Current release

Other Additional Information:

Miscellaneous Information:

Also relevant to #13266

@lidel
Copy link

lidel commented Jan 21, 2021

I wrote my understanding why we went with // in ipfs/ipfs-companion#164 (comment):

[..] Origin isolation is way more important than being visually compliant with RFC, but as long the Origin isolation per CID is maintained, we should be ok with removal of //

@bbondy while we evaluate this, are we able to add support for ipfs:bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi as a redirect to ipfs:// for now?

@bbondy bbondy added the priority/P3 The next thing for us to work on. It'll ride the trains. label Jan 21, 2021
@bbondy
Copy link
Member

bbondy commented Jan 21, 2021

ipfs:bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi as a redirect to ipfs:// for now?

I think so but we'll have to dive in and see.

@stephendonner
Copy link

Verified FIXED using nightly build

Brave 1.23.19 Chromium: 89.0.4389.72 (Official Build) nightly (x86_64)
Revision 3f345f156bfd157bd1bea06310e55f3fb2490359-refs/branch-heads/4389@{#1393}
OS macOS Version 11.2.2 (Build 20D80)

ipfs:QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme redirects (as per #13677 (comment)) to ipfs://bafybeie5nqv6kd3qnfjupgvz34woh3oksc3iau6abmyajn7qvtf6d2ho34/readme which also means that the 2nd testcase here, will still work.

13677

Thanks for filing this, @ingokeck - while that's still under discussion, if there's a need to file a new bug to change that behavior, please do file it; thanks!

@ingokeck
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants