]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4832: '!schemeAccess' assertion on exit (#819)
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 19 May 2021 11:37:34 +0000 (11:37 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Sun, 30 May 2021 09:58:14 +0000 (21:58 +1200)
* Add test to detect the bug and prevent regressions

* delete the access list if not cleared by the time
  Auth::Config instance is destructed. This is what the
  free_AuthSchemes() code does when the function call
  nesting and debugs are pruned away.

src/auth/Config.h
test-suite/squidconf/bug4832 [new file with mode: 0644]

index 574fc7d852e4917dbc569f7abfe3825cf61a456c..748e79bae4915118a694928535e69d2d5600cabd 100644 (file)
@@ -20,13 +20,10 @@ namespace Auth
 
 class Config
 {
-    explicit Config(const Config &) = delete;
-    explicit Config(const Config *) = delete;
-
 public:
     Config() = default;
-    explicit Config(Config &&) = default;
-    ~Config() { assert(!schemeAccess); }
+    Config(Config &&) = delete; // no support for copying of any kind
+    ~Config() = default;
 
     /// set of auth_params directives
     Auth::ConfigVector schemes;
diff --git a/test-suite/squidconf/bug4832 b/test-suite/squidconf/bug4832
new file mode 100644 (file)
index 0000000..66ffa52
--- /dev/null
@@ -0,0 +1,2 @@
+auth_param basic /dev/null
+auth_schemes basic all