From 7593f77b99ca9cc3c8aa8c09d222c9d1ae8309e4 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 28 Aug 2007 19:46:54 +0000 Subject: When a server sends a SERVER command with <5 params, dont just close the connection without error. Give the error "Protocol violation -- Missing SID" git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7974 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 5fa2a25ae..678e9d56f 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -776,7 +776,11 @@ bool TreeSocket::RemoveStatus(const std::string &prefix, std::deque bool TreeSocket::RemoteServer(const std::string &prefix, std::deque ¶ms) { if (params.size() < 5) + { + SendError("Protocol error - Missing SID"); return false; + } + std::string servername = params[0]; std::string password = params[1]; // hopcount is not used for a remote server, we calculate this ourselves @@ -836,7 +840,10 @@ bool TreeSocket::ComparePass(const std::string &ours, const std::string &theirs) bool TreeSocket::Outbound_Reply_Server(std::deque ¶ms) { if (params.size() < 5) + { + SendError("Protocol error - Missing SID"); return false; + } irc::string servername = params[0].c_str(); std::string sname = params[0]; @@ -904,7 +911,11 @@ bool TreeSocket::Outbound_Reply_Server(std::deque ¶ms) bool TreeSocket::Inbound_Server(std::deque ¶ms) { if (params.size() < 5) + { + SendError("Protocol error - Missing SID"); return false; + } + irc::string servername = params[0].c_str(); std::string sname = params[0]; std::string password = params[1]; -- cgit v1.2.3