]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
c-hyper: clear NTLM auth buffer when request is issued
authorDaniel Stenberg <daniel@haxx.se>
Thu, 27 May 2021 08:19:50 +0000 (10:19 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 27 May 2021 14:50:59 +0000 (16:50 +0200)
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

.travis.yml
lib/c-hyper.c

index 07d6be54842fb2a4fb92eeadc0376d83f3763555..0b4b4e4307243a0e806317305d10f13bf09d622f 100644 (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
index 5908f6e1f73c1b7de338d884e0974946c6f3f35e..b6654f5c2865c72569084e48f2d55082cbb539dd 100644 (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: