]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4832: '!schemeAccess' assertion on exit (#819) 4.15-20210522-snapshot 4.15-20210523-snapshot 4.15-20210524-snapshot 5.0.6-20210522-snapshot 5.0.6-20210523-snapshot 5.0.6-20210524-snapshot 6.0.0-20210522-master-snapshot 6.0.0-20210523-master-snapshot 6.0.0-20210524-master-snapshot
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 19 May 2021 11:37:34 +0000 (11:37 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 19 May 2021 14:20:04 +0000 (14:20 +0000)
* 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