diff options
| author | Sadie Powell <sadie@witchery.services> | 2024-03-11 19:37:11 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2024-03-11 19:39:47 +0000 |
| commit | 02355546ff4a76a10049f9c7f03d0b778b247dba (patch) | |
| tree | 072b150c8f46b0038f1d21b423ca57319cbde338 /modules/nickserv/ns_register.cpp | |
| parent | 6ad3430ac41fdd3669d1f4d23e8a0a3adba22c2b (diff) | |
Reject registrations and password changes if password encryption fails.
Diffstat (limited to 'modules/nickserv/ns_register.cpp')
| -rw-r--r-- | modules/nickserv/ns_register.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/nickserv/ns_register.cpp b/modules/nickserv/ns_register.cpp index 599e50e45..0f5fc5533 100644 --- a/modules/nickserv/ns_register.cpp +++ b/modules/nickserv/ns_register.cpp @@ -211,10 +211,17 @@ public: source.Reply(MAIL_X_INVALID, email.c_str()); else { + Anope::string encpass; + if (!Anope::Encrypt(pass, encpass)) + { + source.Reply(_("Accounts can not be registered right now. Please try again later.")); + return; + } + auto *nc = new NickCore(u_nick); auto *na = new NickAlias(u_nick, nc); - Anope::Encrypt(pass, nc->pass); nc->email = email; + nc->pass = encpass; if (u) { |
