mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:23:39 +03:00
Fred New reported a bug where we used Basic auth and user name and password in
.netrc, and when following a Location: the subsequent requests didn't properly use the auth as found in the netrc file. Added test case 257 to verify my fix.
This commit is contained in:
parent
6e1633a6c5
commit
01165e08e0
7 changed files with 130 additions and 7 deletions
|
|
@ -465,6 +465,7 @@ Curl_http_output_auth(struct connectdata *conn,
|
|||
/* To prevent the user+password to get sent to other than the original
|
||||
host due to a location-follow, we do some weirdo checks here */
|
||||
if(!data->state.this_is_a_follow ||
|
||||
conn->bits.netrc ||
|
||||
!data->state.first_host ||
|
||||
curl_strequal(data->state.first_host, conn->host.name) ||
|
||||
data->set.http_disable_hostname_check_before_authentication) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue