summaryrefslogtreecommitdiff
path: root/modules/sasl.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-02-23 17:49:29 +0000
committerSadie Powell <sadie@witchery.services>2025-02-23 17:50:05 +0000
commita4bfd52b7ed4a11d0795d8f35676c5892812ff43 (patch)
treebad59dcd3e233294fe3d76d8f000f48cec228326 /modules/sasl.cpp
parent34a539ba789178d5c7f560c8cfd361b786e0d217 (diff)
If a user is already connected on SASL fail just call BadPassword.
Diffstat (limited to 'modules/sasl.cpp')
-rw-r--r--modules/sasl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/sasl.cpp b/modules/sasl.cpp
index f1a8f53bc..5b1ea94ec 100644
--- a/modules/sasl.cpp
+++ b/modules/sasl.cpp
@@ -328,6 +328,13 @@ public:
{
this->SendMessage(session, "D", "F");
+ auto *u = User::Find(session->uid);
+ if (u)
+ {
+ u->BadPassword();
+ return;
+ }
+
const auto badpasslimit = Config->GetBlock("options")->Get<int>("badpasslimit");
if (!badpasslimit)
return;