From 4579bc55244813b54c9a058b723267e197d322d3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 5 Sep 2024 13:25:46 +0100 Subject: [PATCH] Log if the server is using a md5 cloak as their primary method. --- src/modules/m_cloak_md5.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/m_cloak_md5.cpp b/src/modules/m_cloak_md5.cpp index bcd7d399e..1c301b613 100644 --- a/src/modules/m_cloak_md5.cpp +++ b/src/modules/m_cloak_md5.cpp @@ -302,8 +302,14 @@ public: throw ModuleException(creator, "You have not defined a cloaking key. Define as a " + ConvToStr(minkeylen) + "+ character network-wide secret, at " + tag->source.str()); // If we are the first cloak method then mandate a strong key. - if (primary && key.length() < minkeylen) - throw ModuleException(creator, "Your cloaking key is not secure. It should be at least " + ConvToStr(minkeylen) + " characters long, at " + tag->source.str()); + if (primary) + { + if (key.length() < minkeylen) + throw ModuleException(creator, "Your cloaking key is not secure. It should be at least " + ConvToStr(minkeylen) + " characters long, at " + tag->source.str()); + + ServerInstance->Logs.Normal(MODNAME, "The {} cloak method is deprecated and will be removed in the next major version of InspIRCd. Consider migrating to cloak_sha256 instead. See " INSPIRCD_DOCS "modules/cloak_md5 for more information.", + name.c_str() + 6); + } return std::make_shared(this, tag, mode, key); }