-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Security] Even more strict on address bar for IPFS #13873
Comments
CID spec is at: TLDR is that we have CIDv0 (legacy, implicit base, version and codec) and CIDv1 (future-proof, with explicit base encoding, version number and codec). CIDv0 is not safe for use in browser context due to being case-sensitive (base58 breaks when force-lowercased on subdomains), so our gateway converts it to CIDv1 in Base32 ( How to implement validation? I see two ways:
I suggest doing (B) first. Good for now, does not require maintenance and validation function can always update to full one if we decide its necessary. |
agreed on B) for now |
@spylogsster mind adding a testplan for this? Thanks! |
Test Plan:
|
Thanks, @spylogsster - quick question: For the last bullet point there, I did the following:
I got an error, though; am I grabbing the right [CID]? Thanks in advance! |
@stephendonner QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco should be resolved first, use this as ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco |
Verified Steps:
Verified the URL bar retained it as such. Verification passed on
Verified
Steps:
Verified the URL bar retained it as such.
|
@stephendonner FYSA |
This issue #13872 makes it so we only use
ipns://
andipfs://
for configured gateways.This issue is to track being even more strict and only replacing
ipfs://
when there is a valid CID.This is about the reverse lookup code which will show ipfs://
We only want to do that when it's a valid CID.
For .ipfs.localhost:
If is not in the right format, we shouldn't show ipfs:// reverse mapping
The text was updated successfully, but these errors were encountered: