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

Investigate why /ipfs/{invalid cid} returns different Status Code now #8924

Closed
lidel opened this issue Apr 29, 2022 · 2 comments · Fixed by #9126
Closed

Investigate why /ipfs/{invalid cid} returns different Status Code now #8924

lidel opened this issue Apr 29, 2022 · 2 comments · Fixed by #9126
Assignees
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up topic/gateway Topic gateway
Milestone

Comments

@lidel
Copy link
Member

lidel commented Apr 29, 2022

curl -v http://127.0.0.1:8080/ipfs/2329.png returned:

  • returned 400 Bad Request in 0.12.2
  • now returns 404 Not Found (master @ 25cc85f)

IIUC this a low impact change, and we should be ok with 404 (comment below if you think otherwise), but would be useful to understand how it happened.

Potential causes:

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Apr 29, 2022
@aschmahmann
Copy link
Contributor

It was #8885. In particular we don't check validity of the /ipfs namespace anymore and instead end up relying on the path resolution to fail e07baf5#diff-427f4a268b11d614e7c3b3fdf35040496dd19492e325e3b1bd4bdaa4f8bf8e66R950. Previously we checked validity earlier e07baf5#diff-427f4a268b11d614e7c3b3fdf35040496dd19492e325e3b1bd4bdaa4f8bf8e66L381.

Not sure if there are other ramifications of the refactor there.

@aschmahmann aschmahmann mentioned this issue May 4, 2022
65 tasks
@BigLep BigLep added this to the go-ipfs 0.13 milestone May 5, 2022
@lidel
Copy link
Member Author

lidel commented May 16, 2022

This is a low priority and low impact bug, but we should

  • restore old behavior – missing content root identifier is – semantically – a Bad Request
  • add sharness test for /ipfs[/] and /ipns[/]

@lidel lidel removed their assignment May 16, 2022
@lidel lidel added P2 Medium: Good to have, but can wait until someone steps up effort/hours Estimated to take one or several hours topic/gateway Topic gateway and removed need/triage Needs initial labeling and prioritization labels May 16, 2022
@lidel lidel modified the milestones: go-ipfs 0.13, go-ipfs 0.14 Jun 19, 2022
@lidel lidel self-assigned this Jul 19, 2022
@BigLep BigLep modified the milestones: kubo 0.14, kubo 0.15 Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up topic/gateway Topic gateway
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants