]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix external ACL user:pass detail logging after adaptation
authorNathan Hoad <nathan@getoffmalawn.com>
Sun, 14 Jul 2013 03:03:53 +0000 (21:03 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Jul 2013 03:03:53 +0000 (21:03 -0600)
When a request is successfully adapted, the external ACL username and
password are now inherited with this patch. This means the
LFT_USER_NAME log token can display the username from an external ACL
if available, for adapted requests.

The HttpRequest will inherit the password for good measure as well -
while none too useful, it seems strange to inherit the username but
not the password.

src/HttpRequest.cc

index 036080781589803bec4cb7d94194d694d01325cc..b718c87f8bf0703f656b36ab135831930006c39b 100644 (file)
@@ -227,10 +227,6 @@ HttpRequest::clone() const
 
     copy->myportname = myportname;
     copy->tag = tag;
-#if USE_AUTH
-    copy->extacl_user = extacl_user;
-    copy->extacl_passwd = extacl_passwd;
-#endif
     copy->extacl_log = extacl_log;
     copy->extacl_message = extacl_message;
 
@@ -270,6 +266,8 @@ HttpRequest::inheritProperties(const HttpMsg *aMsg)
     errDetail = aReq->errDetail;
 #if USE_AUTH
     auth_user_request = aReq->auth_user_request;
+    copy->extacl_user = extacl_user;
+    copy->extacl_passwd = extacl_passwd;
 #endif
 
     // main property is which connection the request was received on (if any)