Repository navigation
🐛 bug: unbracket IPv6 literals without port in CookieJar - #4877
ReneWerner87 merged 1 commit into
Conversation
Signed-off-by: Helmi Pradita <helmipraditaa@gmail.com>
|
No actionable comments were generated in the recent review. Walkthrough
ChangesIPv6 cookie host normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Possibly related PRs
Suggested labels: Suggested reviewers: Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4877 +/- ##
==========================================
+ Coverage 96.02% 96.04% +0.01%
==========================================
Files 156 156
Lines 20012 20014 +2
==========================================
+ Hits 19217 19222 +5
+ Misses 483 481 -2
+ Partials 312 311 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
normalizeCookieHostinclient/cookiejar.gostrips brackets from IPv6 literals only when a port is present (becauseutils.SplitHostPortunbrackets"[::1]:8080"into"::1", while"[::1]"returnsok == falseand keeps the brackets). As a result, cookies stored from a host with a port did not match lookups for the same IPv6 host without a port, and vice versa.This unbrackets enclosing
[...]innormalizeCookieHostwhenutils.SplitHostPortdoes not match, keeping storage and lookup keys consistent regardless of port presence.Refs #4604
Changes introduced
Bug fix (non-breaking change which fixes an issue)
Strip surrounding
[/]innormalizeCookieHostwhenutils.SplitHostPortreturnsok == false.Extend
Test_CookieJar_NormalizedHostPathswith IPv6 bracketed/unbracketed port transitions.Checklist
🤖 Maintainers:
/generatere-runs the code generators on this branch