]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix external ACL user:pass detail logging after adaptation
authorNathan Hoad <nathan@getoffmalawn.com>
Fri, 26 Jul 2013 11:47:48 +0000 (05:47 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 26 Jul 2013 11:47:48 +0000 (05:47 -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 94504d51d4578bd29cb44c7ec977eb9381d3ac64..8f067e9457f5b066796f83f4a454155910208eb2 100644 (file)
@@ -222,10 +222,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;
 
@@ -265,6 +261,8 @@ HttpRequest::inheritProperties(const HttpMsg *aMsg)
     errDetail = aReq->errDetail;
 #if USE_AUTH
     auth_user_request = aReq->auth_user_request;
+    extacl_user = aReq->extacl_user;
+    extacl_passwd = aReq->extacl_passwd;
 #endif
 
     // main property is which connection the request was received on (if any)