Files
CLIProxyAPI/internal/auth
Luis Pater 91ccf28400 fix(antigravity): bound auth response reads, preserve error details, and make onboarding sleep ctx-aware
- Bound response body reads with io.LimitReader in FetchProjectID and OnboardUser (1 MiB for 2xx JSON payloads and 64 KiB for non-2xx error bodies) and cap HTTPStatusError messages at 8 KiB on valid UTF-8 boundaries instead of slicing OnboardUser errors at 200 raw bytes.
- Replace the uninterruptible 2-second time.Sleep in OnboardUser polling with a context-aware timer select, skip the trailing sleep after the final attempt, and normalize nil contexts safely.
- Add race-tested regression tests in internal/auth/antigravity/auth_test.go covering structured 403/429 error preservation, UTF-8 boundary truncation, immediate polling cancellation via synctest, and response body read limits.

Closes: #7759
2026-11-21 20:20:54 +08:00
..
2025-08-25 16:58:16 +08:00
2025-08-25 16:58:16 +08:00