]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 5417: An empty annotation value does not match (#1896)
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 5 Sep 2024 17:46:20 +0000 (17:46 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 9 Sep 2024 12:52:22 +0000 (12:52 +0000)
commit5370d36199e577b6aa424658260aab08e32d9015
tree4732dd1d2f445eb06ff55099a72e56c90dbdcdba
parent4d6dd3ddba5e850a42c86d8233735165a371c31c
Bug 5417: An empty annotation value does not match (#1896)

Helpers may return annotations with empty values:

    OK team_=""

A note ACL may be configured to match an annotation with an empty value:

    configuration_includes_quoted_values on
    acl emptyTeam note team_ ""

However, that emptyTeam ACL did not match the above helper annotation:

* AppendTokens() split an empty annotation value into an empty vector
  instead of a vector with a single empty entry. That "never match an
  empty value received from the helper" bug was probably introduced in
  2017 commit 75d47340 when it replaced an "always try to match an empty
  value, even when it was not received from the helper" bug in
  ACLNoteStrategy::matchNotes().

* ACLStringData::match(SBuf v) never matched an empty value v. That bug
  was probably introduced in 2015 commit 76ee67ac that mistook a nil
  c-string pointer for an empty c-string.
src/Notes.cc
src/acl/StringData.cc