summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorlinuxdaemon <linuxdaemon@users.noreply.github.com>2019-01-24 07:34:54 -0600
committerPeter Powell <petpow@saberuk.com>2019-01-24 13:34:54 +0000
commita7fac86ccda9e75c6f426b07faa85081f5857d33 (patch)
tree46463ea6d585a52d26bb150ad0c2c0b594cfc49d /src/modules
parent806e4006199a057e0e7f82420a491e8fe6dd15cb (diff)
Avoid forwarding passwords to nickserv when using SASL (#1562)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_passforward.cpp8
1 files changed, 8 insertions, 0 deletions
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 */