From: Amos Jeffries Date: Thu, 17 Nov 2011 09:48:40 +0000 (-0700) Subject: Bug 3412: External ACL Uses Invalid Cache Entry X-Git-Tag: SQUID_3_1_17~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22b0db7900a00cf0d4cb9433e0b4c9e2d2fe2bbb;p=thirdparty%2Fsquid.git Bug 3412: External ACL Uses Invalid Cache Entry --- diff --git a/src/external_acl.cc b/src/external_acl.cc index 342e8cb383..8a6869cd43 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -688,9 +688,15 @@ aclMatchExternal(external_acl_data *acl, ACLFilledChecklist *ch) entry = ch->extacl_entry; if (entry) { - if (cbdataReferenceValid(entry) && entry->def == acl->def && - strcmp((char *)entry->key, key) == 0) { - /* Ours, use it.. */ + if (cbdataReferenceValid(entry) && entry->def == acl->def) { + /* Ours, use it.. if the key matches */ + key = makeExternalAclKey(ch, acl); + if (strcmp(key, (char*)entry->key) != 0) { + debugs(82, 9, HERE << "entry key='" << (char *)entry->key << "', our key='" << key << "' dont match. Discarded."); + // too bad. need a new lookup. + cbdataReferenceDone(ch->extacl_entry); + entry = NULL; + } } else { /* Not valid, or not ours.. get rid of it */ cbdataReferenceDone(ch->extacl_entry);