c-hyper: clear NTLM auth buffer when request is issued

To prevent previous ones to get reused on subsequent requests. Matches
how the built-in HTTP code works. Makes test 90 to 93 work.

Add test 90 to 93 in travis.

Closes #7139
This commit is contained in:
Daniel Stenberg 2021-05-27 10:19:50 +02:00
parent ee97f17697
commit 23b99fc94c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 1 deletions

View File

@ -116,7 +116,7 @@ jobs:
- libbrotli-dev
- libzstd-dev
- env:
- T=debug HYPER="yes" C="--with-hyper=$HOME/hyper --with-openssl" LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib TFLAGS="1 to 89"
- T=debug HYPER="yes" C="--with-hyper=$HOME/hyper --with-openssl" LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib TFLAGS="1 to 93"
addons:
apt:
<<: *common_apt

View File

@ -881,6 +881,10 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
}
conn->datastream = Curl_hyper_stream;
/* clear userpwd and proxyuserpwd to avoid re-using old credentials
* from re-used connections */
Curl_safefree(data->state.aptr.userpwd);
Curl_safefree(data->state.aptr.proxyuserpwd);
return CURLE_OK;
error: