curl_quiche: refuse headers with CR, LF or null bytes#20101
Conversation
Also renamed the struct field to 'h1hdr' from 'scratch' to better say what its purpose is.
There was a problem hiding this comment.
Pull request overview
This PR adds security validation to refuse HTTP/3 headers containing CR, LF, or null bytes, and improves code clarity by renaming the scratch field to h1hdr to better reflect its purpose as a buffer for HTTP/1-style header construction.
Key Changes:
- Introduced
fineh3header()validation function to check header values for invalid characters (CR, LF, null) - Renamed struct field
scratchtoh1hdrthroughout the codebase for better clarity - Added validation check before processing regular headers
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
augment review |
🤖 Augment PR SummarySummary: Hardens curl’s quiche-based HTTP/3 response header handling by rejecting header fields containing CR/LF/NUL, preventing unsafe HTTP/1-style header reconstruction. Changes:
Technical Notes: This change reduces the risk of header injection or parser confusion when converting HTTP/3 headers into HTTP/1-like lines for downstream processing. 🤖 Was this summary useful? React with 👍 or 👎 |
Also renamed the struct field to 'h1hdr' from 'scratch' to better say what its purpose is.