From: Steve Hill Date: Sun, 27 Sep 2015 00:01:09 +0000 (-0700) Subject: Bug 4328: %un format code does not work for external ACLs in credentials-fetching... X-Git-Tag: SQUID_3_5_10~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7aa2f3dc076b0a5b7ba6fde199f6f0c7b8c6ff0b;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 53ebe05aeb..40fdb02ecf 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -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();