From a7fac86ccda9e75c6f426b07faa85081f5857d33 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Thu, 24 Jan 2019 07:34:54 -0600 Subject: Avoid forwarding passwords to nickserv when using SASL (#1562) --- src/modules/m_passforward.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp index 08d3533cd..37efec02b 100644 --- a/src/modules/m_passforward.cpp +++ b/src/modules/m_passforward.cpp @@ -18,6 +18,7 @@ #include "inspircd.h" +#include "modules/account.h" class ModulePassForward : public Module { @@ -82,6 +83,13 @@ class ModulePassForward : public Module if (!user->MyClass->config->getString("password").empty()) return; + AccountExtItem* actext = GetAccountExtItem(); + if (actext && actext->get(user)) + { + // User is logged in already (probably via SASL) don't forward the password + return; + } + if (!nickrequired.empty()) { /* Check if nick exists and its server is ulined */ -- cgit v1.2.3