From: Steve Hill Date: Fri, 25 Sep 2015 05:07:55 +0000 (-0700) Subject: Bug 4328: %un format code does not work for external ACLs in credentials-fetching... X-Git-Tag: SQUID_4_0_1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=935520fd9a3fde65910087f62780411557fb130f;p=thirdparty%2Fsquid.git Bug 4328: %un format code does not work for external ACLs in credentials-fetching rules --- diff --git a/src/external_acl.cc b/src/external_acl.cc index db22c204b3..df549ff9e1 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -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();