Skip to content

Commit 80bb961

Browse files
committed
2026-04-20
1 parent 897dac1 commit 80bb961

10 files changed

Lines changed: 309 additions & 22 deletions

File tree

squid-dev/2026-April.txt

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,3 +1257,104 @@ Thanks!
12571257
--
12581258
Francesco
12591259

1260+
From ankor2023 at gmail.com Mon Apr 20 09:50:21 2026
1261+
From: ankor2023 at gmail.com (Andrey K)
1262+
Date: Mon, 20 Apr 2026 12:50:21 +0300
1263+
Subject: [squid-dev] Issue with acl note (without -m) splitting helper
1264+
tokens containing commas
1265+
In-Reply-To: <CADJd0Y1M=Z9VY6spPMcR1SoFgrfDKuWdbWM=6=A=CEoS+oi+Og@mail.gmail.com>
1266+
References: <CADJd0Y1M=Z9VY6spPMcR1SoFgrfDKuWdbWM=6=A=CEoS+oi+Og@mail.gmail.com>
1267+
Message-ID: <CADJd0Y2eRvv9dtZKRFgzQk3bRZJCXvzxkYCAzSgqw-fweGd7MA@mail.gmail.com>
1268+
1269+
Hello,
1270+
1271+
I think I?ve come up with a way to minimize the impact of removing the
1272+
default comma delimiter on existing Squid setups.
1273+
We can introduce a new build-time configuration option,
1274+
--with-annotation-values-default-delimiter, so that users who rely on the
1275+
comma separator can rebuild Squid with
1276+
--with-annotation-values-default-delimiter=,.
1277+
While this approach is more conceptually sound and aligns better with the
1278+
documentation, I am concerned that many users rely on vendor-provided
1279+
binary packages and won't have the opportunity to recompile Squid from
1280+
source.
1281+
Alternatively, to avoid breaking existing installations, we could keep the
1282+
comma as the default but allow users to specify an empty delimiter to
1283+
correctly handle tokens that may contain commas and to ensure Squid's
1284+
behavior aligns with the documentation.
1285+
1286+
Which of these approaches would you prefer me to implement in the PR?
1287+
1288+
Kind regards,
1289+
Ankor.
1290+
1291+
??, 17 ???. 2026??. ? 16:08, Andrey K <ankor2023 at gmail.com>:
1292+
1293+
> Hello,
1294+
>
1295+
> While working with annotations, I?ve noticed an inconsistency in how acl
1296+
> note (without the -m option) handles tokens received from helpers when
1297+
> they contain a comma.
1298+
>
1299+
> According to the documentation, an ACL like this:
1300+
> acl staff note group Staff:accountants,lawyers,security
1301+
> should match a helper response such as:
1302+
> group="Staff:accountants,lawyers,security"
1303+
>
1304+
> However, this is not the case. The helper's response is split into tokens
1305+
> using a comma as the default delimiter. As a result, only ACLs like the
1306+
> following will match:
1307+
> acl staff note group lawyers
1308+
>
1309+
> This behavior occurs because in Acl::NoteCheck::matchNotes(), a comma is
1310+
> passed as the default delimiter to the expandListEntries() function:
1311+
> bool
1312+
> ACLNoteStrategy::matchNotes(ACLData<MatchType> *noteData, const
1313+
> NotePairs *note) const
1314+
> {
1315+
> const NotePairs::Entries &entries =
1316+
> note->expandListEntries(&delimiters.value);
1317+
> for (auto e: entries)
1318+
> if (noteData->match(e.getRaw()))
1319+
> return true;
1320+
> return false;
1321+
> }
1322+
>
1323+
> After reviewing the source code, I found that the comma is added in
1324+
> src/acl/Note.h within the AnnotationCheck class constructor:
1325+
> AnnotationCheck(): delimiters(CharacterSet("__FILE__", ",")) {}
1326+
>
1327+
> Using a comma as the default delimiter makes it difficult to validate full
1328+
> tokens that may naturally contain commas.
1329+
>
1330+
> I would like to propose two changes:
1331+
> 1. Removing the default comma delimiter.
1332+
> I am prepared to submit a simple PR to exclude this comma to fix the
1333+
> incorrect matching of strings containing commas.
1334+
> However, I realize this might be a breaking change for users who currently
1335+
> rely on this implicit splitting behavior.
1336+
>
1337+
> 2. Supporting custom delimiters in helper responses.
1338+
> I also propose a PR to support a format where tag values can be passed as
1339+
> a list with a custom delimiter:
1340+
> <key>=<delimiter>"<value1><delimiter><value2>..."
1341+
> For example:
1342+
> group=,"group1,group2,group3"
1343+
> clt_con_tag=;"tag1;tag2;tag3"
1344+
> In this PR, the helper response would be tokenized based on the specified
1345+
> custom delimiter, while still supporting delimiter escaping with a
1346+
> backslash (\).
1347+
> In this scenario, having a hardcoded comma as the default delimiter in the AnnotationCheck
1348+
> class would also create complications.
1349+
>
1350+
> I would appreciate your thoughts on these proposals and whether they align
1351+
> with the project's roadmap.
1352+
>
1353+
> Kind regards,
1354+
> Ankor.
1355+
>
1356+
>
1357+
-------------- next part --------------
1358+
An HTML attachment was scrubbed...
1359+
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20260420/b4759344/attachment.htm>
1360+

squid-dev/2026-April/010017.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</style>
1414
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
1515
<LINK REL="Previous" HREF="010015.html">
16-
<LINK REL="Next" HREF="010018.html">
16+
<LINK REL="Next" HREF="010019.html">
1717
</HEAD>
1818
<BODY BGCOLOR="#ffffff">
1919
<H1>[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas</H1>
@@ -25,7 +25,7 @@ <H1>[squid-dev] Issue with acl note (without -m) splitting helper tokens contain
2525
<P><UL>
2626
<LI>Previous message (by thread): <A HREF="010015.html">[squid-dev] form PROXY header for cache_peer requests
2727
</A></li>
28-
<LI>Next message (by thread): <A HREF="010018.html">[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods
28+
<LI>Next message (by thread): <A HREF="010019.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
2929
</A></li>
3030
<LI> <B>Messages sorted by:</B>
3131
<a href="date.html#10017">[ date ]</a>
@@ -105,13 +105,14 @@ <H1>[squid-dev] Issue with acl note (without -m) splitting helper tokens contain
105105
</PRE>
106106

107107

108+
108109
<!--endarticle-->
109110
<HR>
110111
<P><UL>
111112
<!--threads-->
112113
<LI>Previous message (by thread): <A HREF="010015.html">[squid-dev] form PROXY header for cache_peer requests
113114
</A></li>
114-
<LI>Next message (by thread): <A HREF="010018.html">[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods
115+
<LI>Next message (by thread): <A HREF="010019.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
115116
</A></li>
116117
<LI> <B>Messages sorted by:</B>
117118
<a href="date.html#10017">[ date ]</a>

squid-dev/2026-April/010018.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
</style>
1414
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
15-
<LINK REL="Previous" HREF="010017.html">
15+
<LINK REL="Previous" HREF="010019.html">
1616

1717
</HEAD>
1818
<BODY BGCOLOR="#ffffff">
@@ -23,7 +23,7 @@ <H1>[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods</H1>
2323
</A><BR>
2424
<I>Sun Apr 19 21:35:02 UTC 2026</I>
2525
<P><UL>
26-
<LI>Previous message (by thread): <A HREF="010017.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
26+
<LI>Previous message (by thread): <A HREF="010019.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
2727
</A></li>
2828

2929
<LI> <B>Messages sorted by:</B>
@@ -45,11 +45,12 @@ <H1>[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods</H1>
4545
Francesco
4646
</PRE>
4747

48+
4849
<!--endarticle-->
4950
<HR>
5051
<P><UL>
5152
<!--threads-->
52-
<LI>Previous message (by thread): <A HREF="010017.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
53+
<LI>Previous message (by thread): <A HREF="010019.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
5354
</A></li>
5455

5556
<LI> <B>Messages sorted by:</B>

squid-dev/2026-April/010019.html

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<HTML>
3+
<HEAD>
4+
<TITLE> [squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
5+
</TITLE>
6+
<LINK REL="Index" HREF="index.html" >
7+
<LINK REL="made" HREF="mailto:squid-dev%40lists.squid-cache.org?Subject=Re%3A%20%5Bsquid-dev%5D%20Issue%20with%20acl%20note%20%28without%20-m%29%20splitting%20helper%0A%20tokens%20containing%20commas&In-Reply-To=%3CCADJd0Y2eRvv9dtZKRFgzQk3bRZJCXvzxkYCAzSgqw-fweGd7MA%40mail.gmail.com%3E">
8+
<META NAME="robots" CONTENT="index,nofollow">
9+
<style type="text/css">
10+
pre {
11+
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
12+
}
13+
</style>
14+
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
15+
<LINK REL="Previous" HREF="010017.html">
16+
<LINK REL="Next" HREF="010018.html">
17+
</HEAD>
18+
<BODY BGCOLOR="#ffffff">
19+
<H1>[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas</H1>
20+
<B>Andrey K</B>
21+
<A HREF="mailto:squid-dev%40lists.squid-cache.org?Subject=Re%3A%20%5Bsquid-dev%5D%20Issue%20with%20acl%20note%20%28without%20-m%29%20splitting%20helper%0A%20tokens%20containing%20commas&In-Reply-To=%3CCADJd0Y2eRvv9dtZKRFgzQk3bRZJCXvzxkYCAzSgqw-fweGd7MA%40mail.gmail.com%3E"
22+
TITLE="[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas">ankor2023 at gmail.com
23+
</A><BR>
24+
<I>Mon Apr 20 09:50:21 UTC 2026</I>
25+
<P><UL>
26+
<LI>Previous message (by thread): <A HREF="010017.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
27+
</A></li>
28+
<LI>Next message (by thread): <A HREF="010018.html">[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods
29+
</A></li>
30+
<LI> <B>Messages sorted by:</B>
31+
<a href="date.html#10019">[ date ]</a>
32+
<a href="thread.html#10019">[ thread ]</a>
33+
<a href="subject.html#10019">[ subject ]</a>
34+
<a href="author.html#10019">[ author ]</a>
35+
</LI>
36+
</UL>
37+
<HR>
38+
<!--beginarticle-->
39+
<PRE>Hello,
40+
41+
I think I&#8217;ve come up with a way to minimize the impact of removing the
42+
default comma delimiter on existing Squid setups.
43+
We can introduce a new build-time configuration option,
44+
--with-annotation-values-default-delimiter, so that users who rely on the
45+
comma separator can rebuild Squid with
46+
--with-annotation-values-default-delimiter=,.
47+
While this approach is more conceptually sound and aligns better with the
48+
documentation, I am concerned that many users rely on vendor-provided
49+
binary packages and won't have the opportunity to recompile Squid from
50+
source.
51+
Alternatively, to avoid breaking existing installations, we could keep the
52+
comma as the default but allow users to specify an empty delimiter to
53+
correctly handle tokens that may contain commas and to ensure Squid's
54+
behavior aligns with the documentation.
55+
56+
Which of these approaches would you prefer me to implement in the PR?
57+
58+
Kind regards,
59+
Ankor.
60+
61+
&#1087;&#1090;, 17 &#1072;&#1087;&#1088;. 2026&#8239;&#1075;. &#1074; 16:08, Andrey K &lt;<A HREF="https://lists.squid-cache.org/listinfo/squid-dev">ankor2023 at gmail.com</A>&gt;:
62+
63+
&gt;<i> Hello,
64+
</I>&gt;<i>
65+
</I>&gt;<i> While working with annotations, I&#8217;ve noticed an inconsistency in how acl
66+
</I>&gt;<i> note (without the -m option) handles tokens received from helpers when
67+
</I>&gt;<i> they contain a comma.
68+
</I>&gt;<i>
69+
</I>&gt;<i> According to the documentation, an ACL like this:
70+
</I>&gt;<i> acl staff note group Staff:accountants,lawyers,security
71+
</I>&gt;<i> should match a helper response such as:
72+
</I>&gt;<i> group=&quot;Staff:accountants,lawyers,security&quot;
73+
</I>&gt;<i>
74+
</I>&gt;<i> However, this is not the case. The helper's response is split into tokens
75+
</I>&gt;<i> using a comma as the default delimiter. As a result, only ACLs like the
76+
</I>&gt;<i> following will match:
77+
</I>&gt;<i> acl staff note group lawyers
78+
</I>&gt;<i>
79+
</I>&gt;<i> This behavior occurs because in Acl::NoteCheck::matchNotes(), a comma is
80+
</I>&gt;<i> passed as the default delimiter to the expandListEntries() function:
81+
</I>&gt;<i> bool
82+
</I>&gt;<i> ACLNoteStrategy::matchNotes(ACLData&lt;MatchType&gt; *noteData, const
83+
</I>&gt;<i> NotePairs *note) const
84+
</I>&gt;<i> {
85+
</I>&gt;<i> const NotePairs::Entries &amp;entries =
86+
</I>&gt;<i> note-&gt;expandListEntries(&amp;delimiters.value);
87+
</I>&gt;<i> for (auto e: entries)
88+
</I>&gt;<i> if (noteData-&gt;match(e.getRaw()))
89+
</I>&gt;<i> return true;
90+
</I>&gt;<i> return false;
91+
</I>&gt;<i> }
92+
</I>&gt;<i>
93+
</I>&gt;<i> After reviewing the source code, I found that the comma is added in
94+
</I>&gt;<i> src/acl/Note.h within the AnnotationCheck class constructor:
95+
</I>&gt;<i> AnnotationCheck(): delimiters(CharacterSet(&quot;__FILE__&quot;, &quot;,&quot;)) {}
96+
</I>&gt;<i>
97+
</I>&gt;<i> Using a comma as the default delimiter makes it difficult to validate full
98+
</I>&gt;<i> tokens that may naturally contain commas.
99+
</I>&gt;<i>
100+
</I>&gt;<i> I would like to propose two changes:
101+
</I>&gt;<i> 1. Removing the default comma delimiter.
102+
</I>&gt;<i> I am prepared to submit a simple PR to exclude this comma to fix the
103+
</I>&gt;<i> incorrect matching of strings containing commas.
104+
</I>&gt;<i> However, I realize this might be a breaking change for users who currently
105+
</I>&gt;<i> rely on this implicit splitting behavior.
106+
</I>&gt;<i>
107+
</I>&gt;<i> 2. Supporting custom delimiters in helper responses.
108+
</I>&gt;<i> I also propose a PR to support a format where tag values can be passed as
109+
</I>&gt;<i> a list with a custom delimiter:
110+
</I>&gt;<i> &lt;key&gt;=&lt;delimiter&gt;&quot;&lt;value1&gt;&lt;delimiter&gt;&lt;value2&gt;...&quot;
111+
</I>&gt;<i> For example:
112+
</I>&gt;<i> group=,&quot;group1,group2,group3&quot;
113+
</I>&gt;<i> clt_con_tag=;&quot;tag1;tag2;tag3&quot;
114+
</I>&gt;<i> In this PR, the helper response would be tokenized based on the specified
115+
</I>&gt;<i> custom delimiter, while still supporting delimiter escaping with a
116+
</I>&gt;<i> backslash (\).
117+
</I>&gt;<i> In this scenario, having a hardcoded comma as the default delimiter in the AnnotationCheck
118+
</I>&gt;<i> class would also create complications.
119+
</I>&gt;<i>
120+
</I>&gt;<i> I would appreciate your thoughts on these proposals and whether they align
121+
</I>&gt;<i> with the project's roadmap.
122+
</I>&gt;<i>
123+
</I>&gt;<i> Kind regards,
124+
</I>&gt;<i> Ankor.
125+
</I>&gt;<i>
126+
</I>&gt;<i>
127+
</I>-------------- next part --------------
128+
An HTML attachment was scrubbed...
129+
URL: &lt;<A HREF="http://lists.squid-cache.org/pipermail/squid-dev/attachments/20260420/b4759344/attachment.htm">http://lists.squid-cache.org/pipermail/squid-dev/attachments/20260420/b4759344/attachment.htm</A>&gt;
130+
</PRE>
131+
132+
<!--endarticle-->
133+
<HR>
134+
<P><UL>
135+
<!--threads-->
136+
<LI>Previous message (by thread): <A HREF="010017.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
137+
</A></li>
138+
<LI>Next message (by thread): <A HREF="010018.html">[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods
139+
</A></li>
140+
<LI> <B>Messages sorted by:</B>
141+
<a href="date.html#10019">[ date ]</a>
142+
<a href="thread.html#10019">[ thread ]</a>
143+
<a href="subject.html#10019">[ subject ]</a>
144+
<a href="author.html#10019">[ author ]</a>
145+
</LI>
146+
</UL>
147+
148+
<hr>
149+
<a href="https://lists.squid-cache.org/listinfo/squid-dev">More information about the squid-dev
150+
mailing list</a><br>
151+
</body></html>

squid-dev/2026-April/author.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ <h1>April 2026 Archives by author</h1>
1919
</a></b></li>
2020
</ul>
2121
<p><b>Starting:</b> <i>Wed Apr 1 16:12:37 UTC 2026</i><br>
22-
<b>Ending:</b> <i>Sun Apr 19 21:35:02 UTC 2026</i><br>
23-
<b>Messages:</b> 20<p>
22+
<b>Ending:</b> <i>Mon Apr 20 09:50:21 UTC 2026</i><br>
23+
<b>Messages:</b> 21<p>
2424
<ul>
2525

2626
<LI><A HREF="010018.html">[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods
@@ -33,6 +33,11 @@ <h1>April 2026 Archives by author</h1>
3333
<I>Andrey K
3434
</I>
3535

36+
<LI><A HREF="010019.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
37+
</A><A NAME="10019">&nbsp;</A>
38+
<I>Andrey K
39+
</I>
40+
3641
<LI><A HREF="009999.html">[squid-dev] forward bumped traffic to parent in plain form
3742
</A><A NAME="9999">&nbsp;</A>
3843
<I>Anthony Pankov
@@ -126,8 +131,8 @@ <h1>April 2026 Archives by author</h1>
126131
</ul>
127132
<p>
128133
<a name="end"><b>Last message date:</b></a>
129-
<i>Sun Apr 19 21:35:02 UTC 2026</i><br>
130-
<b>Archived on:</b> <i>Sun Apr 19 21:35:17 UTC 2026</i>
134+
<i>Mon Apr 20 09:50:21 UTC 2026</i><br>
135+
<b>Archived on:</b> <i>Mon Apr 20 09:50:37 UTC 2026</i>
131136
<p>
132137
<ul>
133138
<li> <b>Messages sorted by:</b>

squid-dev/2026-April/date.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ <h1>April 2026 Archives by date</h1>
1919
</a></b></li>
2020
</ul>
2121
<p><b>Starting:</b> <i>Wed Apr 1 16:12:37 UTC 2026</i><br>
22-
<b>Ending:</b> <i>Sun Apr 19 21:35:02 UTC 2026</i><br>
23-
<b>Messages:</b> 20<p>
22+
<b>Ending:</b> <i>Mon Apr 20 09:50:21 UTC 2026</i><br>
23+
<b>Messages:</b> 21<p>
2424
<ul>
2525

2626
<LI><A HREF="009999.html">[squid-dev] forward bumped traffic to parent in plain form
@@ -121,13 +121,18 @@ <h1>April 2026 Archives by date</h1>
121121
<LI><A HREF="010018.html">[squid-dev] NO_SPECIAL_HANDLING define for HTTP methods
122122
</A><A NAME="10018">&nbsp;</A>
123123
<I>Francesco Chemolli
124+
</I>
125+
126+
<LI><A HREF="010019.html">[squid-dev] Issue with acl note (without -m) splitting helper tokens containing commas
127+
</A><A NAME="10019">&nbsp;</A>
128+
<I>Andrey K
124129
</I>
125130

126131
</ul>
127132
<p>
128133
<a name="end"><b>Last message date:</b></a>
129-
<i>Sun Apr 19 21:35:02 UTC 2026</i><br>
130-
<b>Archived on:</b> <i>Sun Apr 19 21:35:17 UTC 2026</i>
134+
<i>Mon Apr 20 09:50:21 UTC 2026</i><br>
135+
<b>Archived on:</b> <i>Mon Apr 20 09:50:37 UTC 2026</i>
131136
<p>
132137
<ul>
133138
<li> <b>Messages sorted by:</b>

0 commit comments

Comments
 (0)