From a1972ba9b65e72eb046277162d4b5686c8d6bb15 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 19 Mar 2024 11:54:39 +0000 Subject: [PATCH] Prevent using enc_posix as a primary encryption module. --- modules/extra/enc_posix.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/extra/enc_posix.cpp b/modules/extra/enc_posix.cpp index a33f272fc..c2f60be5e 100644 --- a/modules/extra/enc_posix.cpp +++ b/modules/extra/enc_posix.cpp @@ -19,6 +19,8 @@ public: EPOSIX(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) { + if (ModuleManager::FindFirstOf(ENCRYPTION) == this) + throw ModuleException("enc_posix can not be used as a primary encryption method"); } void OnCheckAuthentication(User *, IdentifyRequest *req) override