Strip Authorization header whenever root URL changes
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Previously the header was stripped only if the hostname changed, but in an https -> http redirect that can leak the credentials on the wire (#4716). Based on with RFC 7235 section 2.2, the header is now stripped if the "canonical root URL" (scheme+authority) has changed, by checking scheme, hostname and port.
authored by Bruce Merry · committed by Bruce Merry · parent dd754d1 · Browse files · 2 files+14 added−2 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+14 added−2 removed
- tests:+11 added−1 removed
- other:+3 added−1 removed