You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library should have a sane default around maximum allowed size of the _redirects file, to remove DoS vector at places where arbitrary CID root can be loaded (e.g., subdomain gateways)
I propose we use this as a hard limit for now and error Parse when more than 64 KiB of rules is read.
This can be a lazy-check performed as we go, this is just a precaution at the library level, in case someone prepares fake dag-pb node with spoofed size value to try to work around any size check done in Kubo.
If this sounds fine, please:
add test that confirms library errors when file is bigger than the limit.
This library should have a sane default around maximum allowed size of the _redirects file, to remove DoS vector at places where arbitrary CID root can be loaded (e.g., subdomain gateways)
There is some prior art in https://gitlab.com/gitlab-org/gitlab-pages/-/issues/472, according to their use case a very big website with ton of redirect rules should still be no more than 64 KiB.
I propose we use this as a hard limit for now and error
Parse
when more than 64 KiB of rules is read.This can be a lazy-check performed as we go, this is just a precaution at the library level, in case someone prepares fake dag-pb node with spoofed size value to try to work around any size check done in Kubo.
If this sounds fine, please:
The text was updated successfully, but these errors were encountered: