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

multibase prefixed CID v0 string should be an error #54

Open
olizilla opened this issue Jan 17, 2023 · 1 comment
Open

multibase prefixed CID v0 string should be an error #54

olizilla opened this issue Jan 17, 2023 · 1 comment

Comments

@olizilla
Copy link
Collaborator

olizilla commented Jan 17, 2023

this should be an error https://cid.ipfs.tech/#zQmTFGZgypZBYozPTF2qqeho5n17MJXSkHRMDhRqmkroAZu

see: multiformats/js-multiformats#240

currently it shows the multibase as "implicit" but it's been explicitly set... and a CID v0 should not have a multibase prefix.

Screenshot 2023-01-17 at 10 46 18

@nielses
Copy link

nielses commented Jun 30, 2024

A similar example here:
https://cid.ipfs.tech/#BCIQJTNS33T6THRXRAR25ZN5TMMORVNP6JKCOS4EW52632DQPVFWMNGY

It shouldn't show multibase as implicit base58btc as it's explicit base32upper. I don't think it should give an error, though (but a warning would be appropriate), because it's actually used as a filename in IPFS Desktop for Windows.

This will give an error:
https://ipfs.io/ipfs/BCIQJTNS33T6THRXRAR25ZN5TMMORVNP6JKCOS4EW52632DQPVFWMNGY

But a valid CID can be found using the CID inspector tool:
https://cid.ipfs.tech/#BCIQJTNS33T6THRXRAR25ZN5TMMORVNP6JKCOS4EW52632DQPVFWMNGY

To arrive at a URI that works:
https://ipfs.io/ipfs/QmYggNCkVfBSLi6Gi1G1JTwVhd7tGpSF5LtwY4LNq5n7fY
or base32 CIDv1 to be more modern:
https://ipfs.io/ipfs/bafybeiezwzn5z7jty3yqi5o4w6zwghi2wx7evbhjoclo5pn5byh2s3ggtm

To break down the Qm CID:
https://cid.ipfs.tech/#QmYggNCkVfBSLi6Gi1G1JTwVhd7tGpSF5LtwY4LNq5n7fY

The filename in IPFS Desktop:
"....ipfs\blocks\NG\CIQJTNS33T6THRXRAR25ZN5TMMORVNP6JKCOS4EW52632DQPVFWMNGY.data"

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

No branches or pull requests

2 participants