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_5_7~3 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=af076a8a254b79751281b69a447b4709278086c0;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 91a9ba91d2..2be5342a33 100644 --- a/src/acl/RegexData.cc +++ b/src/acl/RegexData.cc @@ -83,6 +83,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)