From 02355546ff4a76a10049f9c7f03d0b778b247dba Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 11 Mar 2024 19:37:11 +0000 Subject: Reject registrations and password changes if password encryption fails. --- src/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc.cpp') diff --git a/src/misc.cpp b/src/misc.cpp index a64de450e..d2c05da12 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -494,11 +494,11 @@ bool Anope::Match(const Anope::string &str, const Anope::string &mask, bool case return m == mask_len; } -void Anope::Encrypt(const Anope::string &src, Anope::string &dest) +bool Anope::Encrypt(const Anope::string &src, Anope::string &dest) { EventReturn MOD_RESULT; FOREACH_RESULT(OnEncrypt, MOD_RESULT, (src, dest)); - static_cast(MOD_RESULT); + return MOD_RESULT == EVENT_ALLOW &&!dest.empty(); } Anope::string Anope::printf(const char *fmt, ...) -- cgit