]> 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>
Fri, 25 Sep 2015 05:07:55 +0000 (22:07 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 25 Sep 2015 05:07:55 +0000 (22:07 -0700)
src/external_acl.cc

index db22c204b3b1a50edfcb519c552b48a0451e4921..df549ff9e114b040179e5eaa1a16431a20910742 100644 (file)
@@ -1120,8 +1120,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();