dxbjavid commented on PR #848:
URL: 
https://github.com/apache/httpcomponents-client/pull/848#issuecomment-4989753717

   You're right, and sorry for muddying it: nothing gets stripped, the strategy 
just declines to follow the redirect when the target differs and the request 
carries sensitive headers. My diff had also reintroduced the old comment 
wording, so I've rebased on master and kept your corrected phrasing.
   
   The rationale is about the wire rather than the server. The origin server 
has indeed already seen those headers, but it saw them under TLS. If the 
Location downgrades to http on the same host and port, the redirected request 
is a copy of the original, so Authorization and Cookie get written to a 
plaintext connection where any on-path observer can read them. Host and port 
identify the endpoint but say nothing about whether the transport is encrypted, 
which is what the scheme check adds. It's the same class of issue as curl's 
CVE-2022-27774, where credentials followed a redirect to the same host on a 
different protocol.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to