From 35486d5521f6445ff998c3e91ca0c559587b8052 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 7 Mar 2016 23:42:40 +0000 Subject: Prevent using enc_none as the main encryption module. Plain text passwords are a terrible idea at best and are illegal at worst. Lets not support them. --- modules/encryption/none.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/encryption') diff --git a/modules/encryption/none.cpp b/modules/encryption/none.cpp index 317abb132..840ab7b42 100644 --- a/modules/encryption/none.cpp +++ b/modules/encryption/none.cpp @@ -30,7 +30,8 @@ class ENone : public Module , EventHook(this) , EventHook(this) { - + if (ModuleManager::FindFirstOf(ENCRYPTION) == this) + throw ModuleException("enc_none is deprecated and can not be used as a primary encryption method"); } EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) override -- cgit From 3b0f52c92b744836520af4b9915478569f297d39 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 23 May 2016 19:09:47 +0100 Subject: Remove Anope::Decrypt now encryption is mandated. --- modules/encryption/none.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'modules/encryption') diff --git a/modules/encryption/none.cpp b/modules/encryption/none.cpp index 840ab7b42..3b1f49d33 100644 --- a/modules/encryption/none.cpp +++ b/modules/encryption/none.cpp @@ -21,13 +21,11 @@ class ENone : public Module , public EventHook - , public EventHook , public EventHook { public: ENone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) , EventHook(this) - , EventHook(this) , EventHook(this) { if (ModuleManager::FindFirstOf(ENCRYPTION) == this) @@ -45,16 +43,6 @@ class ENone : public Module return EVENT_ALLOW; } - EventReturn OnDecrypt(const Anope::string &hashm, const Anope::string &src, Anope::string &dest) override - { - if (!hashm.equals_cs("plain")) - return EVENT_CONTINUE; - size_t pos = src.find(':'); - Anope::string buf = src.substr(pos + 1); - Anope::B64Decode(buf, dest); - return EVENT_ALLOW; - } - void OnCheckAuthentication(User *, NickServ::IdentifyRequest *req) override { NickServ::Nick *na = NickServ::FindNick(req->GetAccount()); -- cgit