storj / edge

Storj edge services (including multi-tenant, S3-compatible server to interact with the Storj network)
GNU Affero General Public License v3.0
48 stars 18 forks source link

Link Sharing Service returns 500s instead of 404s for files not found in archives #341

Closed amwolff closed 8 months ago

amwolff commented 1 year ago

Expected Behavior

Opening this link should succeed.

Current Behavior

Link Sharing Service returns 500 Internal Server Error.

Possible Solution

Link Sharing Service can look into ZIP files. However, in this case, the path parameter contains an ampersand, and since path isn't URL-encoded, we fail to find the relevant file.

So there are two issues:

  1. We return 500s instead of 404s when the file's not found in the archive
  2. path isn't URL-encoded

The fix should address both.

storj-gerrit[bot] commented 8 months ago

Change linksharing: return 404 if path not in archive mentions this issue.

storj-gerrit[bot] commented 8 months ago

Change linksharing: encode archived item as query param in URL mentions this issue.