-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Resolution commands rework #5635
Comments
👍 for recursive by default, but given the fact we expose both commands on our public gateways, we should also implement recursion limit enabled by default (or even as a hard limit), otherwise people can easily DOS us by requesting lookup for circular IPNS links. cc #4293 and #4181 where Lars suggested following limits from http tools:
For the record, wget follows up to 20 redirects by default:
Curl limit is 50:
|
Same for |
I've opened an issue on the interface repo so we can track this: https://github.com/ipfs/interface-ipfs-core/issues/377 |
I agree, a recursion limit is a must. @whyrusleeping didn't object and can't remember why we didn't make this recursive by default either. Note: Users can still recursively resolve using |
ipfs name resolve
andipfs dns
should be recursive by default, the current behavior is a surprising foot-gun. We should consider just changing this as I'm sure it'll fix significantly more bugs than it causes.ipfs dns
should resolve up to the first non-dnslink path by default. It shouldn't return an error when it hits a non-dnslink path, it should just return that path.I'd also like to return a partial result when we hit the recursion limit (along with the error) but that's less pressing.
Can anyone think of anything this would break?
@alanshaw, how will this affect JS? Is this doable?
@whyrusleeping any idea why we aren't recursive by default?
The text was updated successfully, but these errors were encountered: