downloads broken in production: uuid.Parse rejects keys with leading slash (regression from #50 fix) #64
Labels
No labels
nagonag
nagonag/ignore
bug
doc
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
IUS/once#64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
All downloads return 404. Server log on pu.schlittermann.de:
Root cause
DownloadPrefix = "dl/"butpath.Join("/", "dl/")strips the trailing slash, giving prefix"/dl". Then inparseKey():Fix
Already committed in
84d9039505785e1d72d30514df2238cefe22321b: the secondkey = strings.TrimPrefix(key, "/")inparseKey()strips the leading slash before UUID validation. Regression test"prefix without trailing slash (path.Join regression)"added inkey_test.go.The binary on
puwas deployed 2026-05-24 and predates this commit. Rebuild and redeploy to fix.Uploaded files
Files in
/var/lib/once/store/heiko/are intact — all download attempts were rejected before reaching the store.Fixed in commit
84d9039(already on master before this issue was filed — spotted it in the production logs).The fix strips the leading slash from the extracted key before UUID validation:
Regression test
"prefix without trailing slash (path.Join regression)"added inkey_test.go.Still needs a package rebuild and
apt upgradeonputo go live.