Andrew Wansink provided an NTLM bugfix: in the case the server sets the flag
authorDaniel Stenberg <daniel@haxx.se>
Tue, 14 Aug 2007 10:28:21 +0000 (10:28 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 14 Aug 2007 10:28:21 +0000 (10:28 +0000)
NTLMFLAG_NEGOTIATE_UNICODE, we need to filter it off because libcurl doesn't
unicode encode the strings it packs into the NTLM authenticate packet.

CHANGES
RELEASE-NOTES
lib/http_ntlm.c

diff --git a/CHANGES b/CHANGES
index dd1220a..98c3648 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
 
                                   Changelog
 
+Daniel S (14 August 2007)
+- Andrew Wansink provided an NTLM bugfix: in the case the server sets the flag
+  NTLMFLAG_NEGOTIATE_UNICODE, we need to filter it off because libcurl doesn't
+  UNICODE encode the strings it packs into the NTLM authenticate packet.
+
 Daniel S (11 August 2007)
 - Allen Pulsifer provided a patch that makes libcurl set the expected download
   size earlier when doing HTTP downloads, so that applications and the
index a50a731..e444a40 100644 (file)
@@ -36,8 +36,10 @@ This release includes the following bugfixes:
  o AIX 4 and 5 get to use non-blocking sockets
  o small POST with NTLM
  o resumed file:// transfers
- o CURLOPT_DNS_CACHE_TIMEOUT and CURLOPT_DNS_USE_GLOBAL_CACHE are 64 bit "clean"
+ o CURLOPT_DNS_CACHE_TIMEOUT and CURLOPT_DNS_USE_GLOBAL_CACHE are 64 bit
+   "clean"
  o memory leak when handling compressed data streams from broken servers
+ o no NTLM unicode response
 
 This release includes the following known bugs:
 
@@ -61,6 +63,6 @@ advice from friends like these:
  Daniel Cater, Colin Hogben, Jofell Gallardo, Daniel Johnson,
  Ralf S. Engelschall, James Housley, Chris Flerackers, Patrick Monnerat,
  Jayesh A Shah, Greg Zavertnik, Peter O'Gorman, Greg Morse, Dmitriy Sergeyev,
- Scott Cantor, Allen Pulsifer
+ Scott Cantor, Allen Pulsifer, Andrew Wansink
  
         Thanks! (and sorry if I forgot to mention someone)
index 863ddf5..e50ace1 100644 (file)
@@ -917,6 +917,13 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
     useroff = domoff + domlen;
     hostoff = useroff + userlen;
 
+    /*
+     * In the case the server sets the flag NTLMFLAG_NEGOTIATE_UNICODE, we
+     * need to filter it off because libcurl doesn't UNICODE encode the
+     * strings it packs into the NTLM authenticate packet.
+     */
+    ntlm->flags &= ~NTLMFLAG_NEGOTIATE_UNICODE;
+
     /* Create the big type-3 message binary blob */
     size = snprintf((char *)ntlmbuf, sizeof(ntlmbuf),
                     NTLMSSP_SIGNATURE "%c"