/*
- * $Id: AuthUserRequest.cc,v 1.4 2005/05/06 01:57:55 hno Exp $
+ * $Id: AuthUserRequest.cc,v 1.5 2005/10/16 16:47:02 serassio Exp $
*
* DO NOT MODIFY NEXT 2 LINES:
* arch-tag: 6803fde1-d5a2-4c29-9034-1c0c9f650eb4
debug(28, 9) ("authenticateAuthenticate: This is a new checklist test on FD:%d\n",
conn.getRaw() != NULL ? conn->fd : -1);
+ if (proxy_auth && !request->auth_user_request && conn.getRaw() && conn->auth_user_request) {
+ AuthScheme * id = AuthScheme::Find(proxy_auth);
+
+ if (!conn->auth_user_request->user() || AuthScheme::Find(conn->auth_user_request->user()->config->type()) != id) {
+ debug(28, 1) ("authenticateAuthenticate: Unexpected change of authentication scheme from '%s' to '%s' (client %s)\n",
+ conn->auth_user_request->user()->config->type(), proxy_auth, inet_ntoa(src_addr));
+ conn->auth_user_request->unlock();
+ conn->auth_user_request = NULL;
+ conn->auth_type = AUTH_UNKNOWN;
+ }
+ }
+
if ((!request->auth_user_request)
&& (conn.getRaw() == NULL || conn->auth_type == AUTH_UNKNOWN)) {
/* beginning of a new request check */
/*
- * $Id: auth_ntlm.cc,v 1.48 2005/09/14 17:10:39 serassio Exp $
+ * $Id: auth_ntlm.cc,v 1.49 2005/10/16 16:47:02 serassio Exp $
*
* DEBUG: section 29 NTLM Authenticator
* AUTHOR: Robert Collins
* challenge - release the helper and use the existing auth_user
* details. */
- if (strncmp("NTLM ", proxy_auth, 5) == 0) {
- ntlm_request->ntlmauthenticate = xstrdup(proxy_auth);
- } else {
- fatal("Incorrect scheme in auth header\n");
- /* TODO: more fault tolerance.. reset the auth scheme here */
- }
+ ntlm_request->ntlmauthenticate = xstrdup(proxy_auth);
/* cache entries have authenticateauthheaderchallengestring */
snprintf(ntlmhash, sizeof(ntlmhash) - 1, "%s%s",