mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Log if the server is using a md5 cloak as their primary method.
This commit is contained in:
parent
1f65eb8efc
commit
4579bc5524
@ -302,8 +302,14 @@ public:
|
||||
throw ModuleException(creator, "You have not defined a cloaking key. Define <cloak:key> 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<CloakInfo>(this, tag, mode, key);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user