registry/internal/api
Repository files (latest commit first)
Filename Latest commit message Latest commit date
lif ab6a5a6b6d
fix(api): reject requests with NUL bytes in URL (#869)
## Summary
- Added `NulByteValidationMiddleware` to validate incoming requests
- Returns 400 Bad Request when NUL bytes (%00) detected in URL path or
query
- Prevents PostgreSQL encoding errors from being exposed as 500 errors

## Before
```
GET /v0.1/servers?cursor=%00
→ 500 Internal Server Error
→ "invalid byte sequence for encoding UTF8: 0x00"
```

## After
```
GET /v0.1/servers?cursor=%00
→ 400 Bad Request
→ "Invalid request: query parameters contain null bytes"
```

Fixes #862

Signed-off-by: majiayu000 <1835304752@qq.com>
Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>
2026-01-03 19:14:44 +02:00
..
handlers/v0 Default to the local registry in the UI (#799) 2025-12-16 21:59:39 +00:00
router Add simple web UI for browsing the registry (#757) 2025-11-10 12:37:36 +00:00
cors_test.go feat: add CORS support to registry API (#711) 2025-10-27 18:07:13 +00:00
openapi_compliance_test.go Ensure tests are failing CI (#840) 2025-12-11 09:56:57 +02:00
server.go fix(api): reject requests with NUL bytes in URL (#869) 2026-01-03 19:14:44 +02:00
server_test.go fix(api): reject requests with NUL bytes in URL (#869) 2026-01-03 19:14:44 +02:00