devbox/internal/hub
shoemoney 96fd6018a9 fix(sec): block blob-hash path traversal (arbitrary file read) 🔓🛡️
GET /v1/blob/{hash} and /v1/have passed the URL hash straight into filepath.Join
in the blob store. Go's ServeMux URL-decodes %2f/%2e in the wildcard, so
'..%2f..%2f..%2fetc%2fpasswd' (or a hash starting with '..') escaped the blob
root — any enrolled device could read arbitrary files incl. the hub token DB.

Defense in depth:
- hub: validHash() rejects non-(64 hex) keys at the HTTP boundary (404 on GET,
  400 on /have) before any store call.
- blobstore: safeKey() rejects keys that aren't a bare, separator-free filename
  in Has/Get/Put/Delete — the sink can't be escaped even if a caller forgets.
e2e + unit regression tests for both layers.
2026-06-23 02:21:03 -05:00
..
blobstore fix(sec): block blob-hash path traversal (arbitrary file read) 🔓🛡️ 2026-06-23 02:21:03 -05:00
meta feat(M6): versioning — log, restore, hub gc 🕰️ 2026-06-23 01:01:54 -05:00
blob_traversal_test.go fix(sec): block blob-hash path traversal (arbitrary file read) 🔓🛡️ 2026-06-23 02:21:03 -05:00
events.go feat(M3): live two-way sync — SSE fan-out + daemon + mount 🔄 2026-06-23 00:12:39 -05:00
server.go fix(sec): block blob-hash path traversal (arbitrary file read) 🔓🛡️ 2026-06-23 02:21:03 -05:00
server_test.go feat(M6): versioning — log, restore, hub gc 🕰️ 2026-06-23 01:01:54 -05:00
sharename.go fix(M7): review fixes — pidfile O_EXCL, publish race, backoff reset 🐛 2026-06-23 01:37:58 -05:00
sharename_test.go fix(M7): review fixes — pidfile O_EXCL, publish race, backoff reset 🐛 2026-06-23 01:37:58 -05:00