digest: handle quotes in the path - #20295
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
f943f97 to
9d0f050
Compare
The 'uri' component needs to be escaped as well. Also, use goto as a general error mechanism. Make test 64 use a double quote in the URL. Closes #20295
There was a problem hiding this comment.
Pull request overview
This pull request adds quote and backslash escaping for the URI component in HTTP Digest authentication headers and refactors error handling to use a goto-based cleanup pattern.
Changes:
- Refactored
auth_digest_string_quoted()to use dynamic buffers instead of pre-calculated allocation - Updated
auth_create_digest_http_message()to use goto-based error handling for cleanup - Added URI escaping for the digest authentication Authorization header
- Modified test64 to include a double quote character in the URL path to verify the escaping functionality
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/data/test64 | Updated test case to include a double quote in the URL and updated expected Authorization header and response hash |
| lib/vauth/digest.c | Refactored string quoting function and digest message creation with improved error handling and URI escaping |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f239b00 to
4aa5e2b
Compare
|
augment review |
🤖 Augment PR SummarySummary: This PR improves HTTP Digest auth header generation when the request path contains quote/backslash characters. Changes:
Technical Notes: The Digest 🤖 Was this summary useful? React with 👍 or 👎 |
The 'uri' component needs to be escaped as well.
Also, use goto as a general error mechanism.
Make test 64 use a double quote in the URL.