]> git.ipfire.org Git - thirdparty/squid.git/commit
Ban acl key changes in req_header, rep_header, and note ACLs (#1210)
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 12 Dec 2022 13:34:12 +0000 (13:34 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 13 Dec 2022 04:19:22 +0000 (04:19 +0000)
commit4a3b85322ce5a464175eb49ddb5be413794b25b8
tree928a42751f143239a948e89850f2476c630a1106
parentae04a0776903f636118598e5c49a8533192620e5
Ban acl key changes in req_header, rep_header, and note ACLs (#1210)

* req_header and rep_header ACLs; the key is the header-name argument:

    acl barred req_header X-1 bar
    acl barred req_header X-2 bar # never matches since commit a0b240c
    http_access deny barred

* the "note" ACL; the key is the annotation name argument:

    acl banned note color green  # never matches since commit 39baccc
    acl banned note weight heavy
    http_access deny banned

Squid did write a cache.log ERROR for req_header/rep_header key changes
but was silent about the preceding "note" ACL rules being ineffective
after a key change (e.g., Squid was not denying "green" requests above).

Now, Squid rejects configurations containing such ACL key changes.

Also significantly reduced the corresponding parsing code duplication.
src/ConfigParser.cc
src/ConfigParser.h
src/acl/HttpHeaderData.cc
src/acl/NoteData.cc
src/tests/stub_acl.cc