From: Amos Jeffries Date: Wed, 19 May 2021 11:37:34 +0000 (+0000) Subject: Bug 4832: '!schemeAccess' assertion on exit (#819) X-Git-Tag: 4.15-20210522-snapshot X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee781581117482defc4fa56e2243642a57152b80;p=thirdparty%2Fsquid.git Bug 4832: '!schemeAccess' assertion on exit (#819) * 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. --- diff --git a/src/auth/Config.h b/src/auth/Config.h index 574fc7d852..748e79bae4 100644 --- a/src/auth/Config.h +++ b/src/auth/Config.h @@ -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 index 0000000000..66ffa52c2c --- /dev/null +++ b/test-suite/squidconf/bug4832 @@ -0,0 +1,2 @@ +auth_param basic /dev/null +auth_schemes basic all