From: Alex Rousskov Date: Fri, 12 Aug 2022 16:06:12 +0000 (+0000) Subject: Do not tell admins that we are replacing their .* with our .* (#1119) X-Git-Tag: SQUID_6_0_1~132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2be67b17dfbfd8f8c2fe331906b7919da7fea2f;p=thirdparty%2Fsquid.git Do not tell admins that we are replacing their .* with our .* (#1119) acl hasHeaderFoo req_header Foo .* 2022/08/12 11:43:27| WARNING: regular expression '.*' has only wildcards and matches all strings. Using '.*' instead. Broken since RE optimization inception (commit 6564dae), but the excessive WARNING was "invisible" to many admins until 61be1d8 started saving early level-0/1 messages to cache.log. --- diff --git a/src/acl/RegexData.cc b/src/acl/RegexData.cc index f4e68926a0..08d4676509 100644 --- a/src/acl/RegexData.cc +++ b/src/acl/RegexData.cc @@ -79,6 +79,9 @@ ACLRegexData::dump() const static const char * removeUnnecessaryWildcards(char * t) { + if (strcmp(t, ".*") == 0) // we cannot simplify that further + return t; // avoid "WARNING: ... Using '.*' instead" below + char * orig = t; if (strncmp(t, "^.*", 3) == 0)