-
Notifications
You must be signed in to change notification settings - Fork 98
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
fix(gateway): panic on path without enough components #272
Conversation
{"127.0.0.1:8080", "/" + k.Cid().String(), http.StatusNotFound, "404 page not found\n"}, | ||
{"127.0.0.1:8080", "/ipfs/this-is-not-a-cid", http.StatusBadRequest, "failed to resolve /ipfs/this-is-not-a-cid: invalid path \"/ipfs/this-is-not-a-cid\": invalid CID: invalid cid: illegal base32 data at input byte 3\n"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ This changes slightly because the path is validated earlier than before.
Codecov Report
@@ Coverage Diff @@
## main #272 +/- ##
==========================================
+ Coverage 47.98% 48.01% +0.03%
==========================================
Files 270 270
Lines 33030 33034 +4
==========================================
+ Hits 15850 15862 +12
+ Misses 15504 15499 -5
+ Partials 1676 1673 -3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Includes ipfs/boxo#265 ipfs/boxo#272 Closes #77
Includes ipfs/boxo#265 ipfs/boxo#272 Closes #77
Closes ipfs-inactive/bifrost-gateway#77. During the refactors we changed the way we resolved paths and introduced
getPathRoots
. I could have added this fix there. However, I decided to check for its validity earlier up.