security fixes
Merged
H3
5mo ago+280+280+012345678901234567890123456789-44-44-01234567890123456789
Summary by cubic
Hardened redirect and header handling across http, gql, and websocket to prevent credential leaks and header injection. Custom auth headers are now stripped on cross‑origin redirects, and CR/LF in header names is rejected.
-
Bug Fixes
- Strip caller-declared auth headers on cross-origin redirects via new
auth_header_namesthreaded from_apply_auth(coversApiKeyAuthcustom header names andAuthorizationfor OAuth2). - Preserve headers on same-origin redirects; added tests to pin behavior.
- Reject CR/LF in attacker-controlled header fields (e.g.,
ApiKeyAuth.var_name) to block HTTP header injection in HTTP/SSE/streamable HTTP paths. - Implemented in
safe_request_with_redirectsforutcp-http,utcp-gql, andutcp-websocket; new param is internal-only and not sent on the wire.
- Strip caller-declared auth headers on cross-origin redirects via new
-
Dependencies
- Bump
utcp-httpto1.1.7,utcp-gqlto1.1.4,utcp-websocketto1.1.4.
- Bump