registry/cmd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yufeng He c36b521bf1
fix: reject mangled publisher metadata (#1310)
## Summary
- add a publisher preflight that rejects non-UTF-8 `server.json` bytes
before parsing
- reject unpaired UTF-16 surrogate escapes inside JSON string fields
before publish/validate requests are sent
- keep valid non-ASCII descriptions, including em dashes, round-tripping
through the publish path
- make the publisher test token helper set `USERPROFILE` as well as
`HOME` so Windows tests use the temp home directory

Closes #1306.

## To verify
- `go test ./cmd/publisher/commands -run
"TestPublishCommand_(Success|PreservesNonASCIIDescription|RejectsInvalidUTF8ServerJSON|RejectsUnpairedSurrogateEscape)$"
-count=1`
- `go test ./cmd/publisher/commands -run TestPublishCommand -count=1`
- `go test ./cmd/publisher/commands -run TestValidateCommand -count=1`
- `git diff --check`

Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>
2026-07-12 12:57:45 -04:00
..
publisher fix: reject mangled publisher metadata (#1310) 2026-07-12 12:57:45 -04:00
registry fix: harden registry availability and add publish phase timings (#1211) 2026-04-27 09:09:50 -04:00