--------------------- PatchSet 1976 Date: 2005/10/23 11:43:32 Author: hno Branch: negotiate Tag: (none) Log: Fix the NTLM scheme mismatch from porting from Negotiate, and reduce the risk of similar error in future. Members: src/auth/negotiate/auth_negotiate.cc:1.1.2.6->1.1.2.7 src/auth/ntlm/auth_ntlm.cc:1.22.2.2->1.22.2.3 test-suite/run_ntlm_test.sh:1.1.2.2->1.1.2.3 Index: squid3/src/auth/negotiate/auth_negotiate.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/auth/negotiate/auth_negotiate.cc,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid3/src/auth/negotiate/auth_negotiate.cc 23 Oct 2005 09:46:01 -0000 1.1.2.6 +++ squid3/src/auth/negotiate/auth_negotiate.cc 23 Oct 2005 11:43:32 -0000 1.1.2.7 @@ -1,6 +1,6 @@ /* - * $Id: auth_negotiate.cc,v 1.1.2.6 2005/10/23 09:46:01 hno Exp $ + * $Id: auth_negotiate.cc,v 1.1.2.7 2005/10/23 11:43:32 hno Exp $ * * DEBUG: section 29 Negotiate Authenticator * AUTHOR: Robert Collins, Henrik Nordstrom, Francesco Chemolli @@ -641,11 +641,7 @@ /* get header */ proxy_auth = httpHeaderGetStr(&request->header, type); - if (strncasecmp("NEGOTIATE ",proxy_auth,5) != 0) { - fatal("AuthNegotiateUserRequest::authenticate: incorrect scheme in auth header\n"); - /* TODO: more fault tolerance.. reset the auth scheme here */ - } - blob = proxy_auth + 10; + blob = proxy_auth + strlen("Negotiate"); while (xisspace(*blob)) // trim leading spaces in blob blob++; Index: squid3/src/auth/ntlm/auth_ntlm.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/auth/ntlm/auth_ntlm.cc,v retrieving revision 1.22.2.2 retrieving revision 1.22.2.3 diff -u -r1.22.2.2 -r1.22.2.3 --- squid3/src/auth/ntlm/auth_ntlm.cc 23 Oct 2005 09:46:34 -0000 1.22.2.2 +++ squid3/src/auth/ntlm/auth_ntlm.cc 23 Oct 2005 11:43:32 -0000 1.22.2.3 @@ -1,6 +1,6 @@ /* - * $Id: auth_ntlm.cc,v 1.22.2.2 2005/10/23 09:46:34 hno Exp $ + * $Id: auth_ntlm.cc,v 1.22.2.3 2005/10/23 11:43:32 hno Exp $ * * DEBUG: section 29 NTLM Authenticator * AUTHOR: Robert Collins, Henrik Nordstrom, Francesco Chemolli @@ -603,11 +603,7 @@ /* get header */ proxy_auth = httpHeaderGetStr(&request->header, type); - if (strncasecmp("NTLM ",proxy_auth,5) != 0) { - fatal("AuthNTLMUserRequest::authenticate: incorrect scheme in auth header\n"); - /* TODO: more fault tolerance.. reset the auth scheme here */ - } - blob = proxy_auth + 10; + blob = proxy_auth + strlen("NTLM"); while (xisspace(*blob)) // trim leading spaces in blob blob++; Index: squid3/test-suite/run_ntlm_test.sh =================================================================== RCS file: /cvsroot/squid-sf//squid3/test-suite/run_ntlm_test.sh,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/test-suite/run_ntlm_test.sh 23 Oct 2005 11:24:31 -0000 1.1.2.2 +++ squid3/test-suite/run_ntlm_test.sh 23 Oct 2005 11:43:33 -0000 1.1.2.3 @@ -1,6 +1,6 @@ #!/bin/sh while read auth; do - echo "HEAT http://www.squid-cache.org/ HTTP/1.0" + echo "HEAD http://www.squid-cache.org/ HTTP/1.0" if [ -n "$auth" ]; then echo "Proxy-Authorization: NTLM $auth" fi