From 92dc25f007b3706b74c779dcd3464b57724808af Mon Sep 17 00:00:00 2001
From: Sadie Powell
Date: Fri, 18 Sep 2020 15:29:48 +0100
Subject: Require SSL for linking servers.
---
src/modules/m_spanningtree/server.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'src/modules/m_spanningtree/server.cpp')
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp
index 682a588f3..f73f9d6db 100644
--- a/src/modules/m_spanningtree/server.cpp
+++ b/src/modules/m_spanningtree/server.cpp
@@ -131,8 +131,6 @@ std::shared_ptr TreeSocket::AuthRemote(const CommandBase::Params& params)
if (!CheckDuplicate(sname, sid))
return NULL;
- ServerInstance->SNO.WriteToSnoMask('l', "Verified server connection " + linkID + " ("+description+")");
-
const SSLIOHook* const ssliohook = SSLIOHook::IsSSL(this);
if (ssliohook)
{
@@ -142,9 +140,11 @@ std::shared_ptr TreeSocket::AuthRemote(const CommandBase::Params& params)
}
else if (!irc::sockets::cidr_mask("127.0.0.0/8").match(capab->remotesa) && !irc::sockets::cidr_mask("::1/128").match(capab->remotesa))
{
- ServerInstance->SNO->WriteGlobalSno('l', "Server connection to %s is not using SSL (TLS). This is VERY INSECURE and will not be allowed in the next major version of InspIRCd.", x->Name.c_str());
+ this->SendError("Non-local server connections MUST be linked with SSL!");
+ return NULL;
}
+ ServerInstance->SNO.WriteToSnoMask('l', "Verified server connection " + linkID + " ("+description+")");
return x;
}
--
cgit v1.3.1-10-gc9f91