From 3de8a78e657b0c637b2ba36c53a56479ab9b8f80 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 6 Apr 2025 17:07:13 +0100 Subject: Fix double registration of PBKDF2 services. --- modules/hash_pbkdf2.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules') diff --git a/modules/hash_pbkdf2.cpp b/modules/hash_pbkdf2.cpp index 1b01f96a3..ec7cd5041 100644 --- a/modules/hash_pbkdf2.cpp +++ b/modules/hash_pbkdf2.cpp @@ -141,6 +141,7 @@ public: : Hash::Provider(mod, FMT::format("pbkdf2-hmac-{}", algorithm)) , provider(mod, algorithm) { + DisableAutoRegister(); } bool Compare(const std::string& hash, const std::string& plain) override @@ -248,6 +249,9 @@ public: if (hp->IsKDF()) return; // Can't use PBKDF2 with a KDF. + if (algos.find(hp->GetAlgorithm()) != algos.end()) + return; // Already created. + auto* algo = new PBKDF2Provider(this, hp->GetAlgorithm()); Configure(algo); ServerInstance->Logs.Debug("HASH", "The {} algorithm was added by {}, also adding {}", -- cgit v1.3.1-10-gc9f91