Burst and the sustained rate were compared against the same window, so
a burst above the sustained rate never took effect. Burst is now
measured over a short window on top of the sustained limit. An unset
burst preserves the previous rate-only behaviour.
- ratelimit: custom UnmarshalJSON temp struct only carried interval/req,
silently dropping the configured 'burst' and 'endpoints' fields. Burst is
consumed at checkRateLimit (burst allowance) but could never be set via
config file. Carry all fields in the temp struct.
- sanitization: a large non-parsable body was truncated before redaction,
potentially leaking a secret in the first MaxLogBodySize bytes, and the
truncation could split a multi-byte UTF-8 rune. Redact the retained
prefix and truncate on a rune boundary (sanitizeTruncatedBody).
- tests: TestRateLimitConfigUnmarshalKeepsBurstAndEndpoints,
TestSanitizeTruncatedBodyRedactsAndKeepsUTF8, TestTruncateUTF8RuneBoundary.