]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4847 pt1: regression in proxy_auth ACL flags (#191)
authorAmos Jeffries <yadij@users.noreply.github.com>
Sat, 5 May 2018 14:42:12 +0000 (14:42 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Wed, 9 May 2018 10:23:29 +0000 (22:23 +1200)
r15058 "Support for --long-acl-options" in Squid-4.0.21
unintentionally removed the proxy_auth ACL support for -i/+i
flags. See bug report for details.

Fix proxy_auth ACL -i and +i flags no longer working by copying
RegexData flags registration, since ACLs for UserData all use
the same names and meanings.

Add documentation to indicate that ident and ext_user ACLs do
support -i/+i just like proxy_auth ACLs.

TODO: fix server_cert_fingerprint ACL which is still broken.

src/acl/UserData.cc
src/acl/UserData.h
src/cf.data.pre

index 9fa95e7f5bb9d22a8bc6163325a7e998f30ac65c..17b5f0e703fdde310b686345d1d7ffb7e5ba295d 100644 (file)
 #include "sbuf/Algorithms.h"
 #include "util.h"
 
+const Acl::ParameterFlags &
+ACLUserData::supportedFlags() const
+{
+    static const Acl::ParameterFlags flagNames = { "-i", "+i" };
+    return flagNames;
+}
+
 bool
 ACLUserData::match(char const *user)
 {
index 057fa7a4506a6fe27e0f9bfd6532a8af2bac76a2..bfee1c925f00c1094dfc34eb9e3baeeaed80e4ea 100644 (file)
@@ -25,6 +25,7 @@ public:
     bool match(char const *user);
     virtual SBufList dump() const;
     void parse();
+    virtual const Acl::ParameterFlags &supportedFlags() const;
     bool empty() const;
     virtual ACLData<char const *> *clone() const;
 
index 6fb795cd80cf0f5287a6fb7aba979aa1ad8de5d1..8ee12268ea0841a8a577f1de46aae3e87b7a8c0f 100644 (file)
@@ -1145,7 +1145,7 @@ DOC_START
          # pattern match on Referer header [fast]
          # Referer is highly unreliable, so use with care
 
-       acl aclname ident username ...
+       acl aclname ident [-i] username ...
        acl aclname ident_regex [-i] pattern ...
          # string match on ident output [slow]
          # use REQUIRED to accept any non-null ident.
@@ -1240,7 +1240,7 @@ DOC_START
          # match against attributes a users issuing CA SSL certificate
          # attribute is one of DN/C/O/CN/L/ST or a numerical OID  [fast]
 
-       acl aclname ext_user username ...
+       acl aclname ext_user [-i] username ...
        acl aclname ext_user_regex [-i] pattern ...
          # string match on username returned by external acl helper [slow]
          # use REQUIRED to accept any non-null user name.