]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4328: %un format code does not work for external ACLs in credentials-fetching...
authorSteve Hill <steve@opendium.com>
Sun, 27 Sep 2015 00:01:09 +0000 (17:01 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 27 Sep 2015 00:01:09 +0000 (17:01 -0700)
src/external_acl.cc

index 53ebe05aeb2426ab5b80b05e7e5074ce4f7a8e21..40fdb02ecfb1f71d18b029c956482f8cd00bf97a 100644 (file)
@@ -1104,8 +1104,14 @@ makeExternalAclKey(ACLFilledChecklist * ch, external_acl_data * acl_data)
         case Format::LFT_USER_NAME:
             /* find the first available name from various sources */
 #if USE_AUTH
+            // if this ACL line was the cause of credentials fetch
+            // they may not already be in the checklist
+            if (!ch->auth_user_request && ch->request)
+                ch->auth_user_request = ch->request->auth_user_request;
+
             if (ch->auth_user_request != NULL)
                 str = ch->auth_user_request->username();
+
             if ((!str || !*str) &&
                     (request->extacl_user.size() > 0 && request->extacl_user[0] != '-'))
                 str = request->extacl_user.termedBuf();