diff options
| author | 2025-04-06 17:07:13 +0100 | |
|---|---|---|
| committer | 2025-04-06 17:17:30 +0100 | |
| commit | 3de8a78e657b0c637b2ba36c53a56479ab9b8f80 (patch) | |
| tree | 1f4287b966b2f17bd37c31d71672f605b82ca263 /modules | |
| parent | Add more debug logging to hash_pbkdf2. (diff) | |
Fix double registration of PBKDF2 services.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/hash_pbkdf2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 {}", |
