summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 19:46:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 19:46:54 +0000
commit7593f77b99ca9cc3c8aa8c09d222c9d1ae8309e4 (patch)
treed6163261288af83fe52eedd9105ff89f98f4b72d /src/modules/m_spanningtree
parent0549fb41568be278319326ae55be69018e2e5aa8 (diff)
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
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp11
1 files changed, 11 insertions, 0 deletions
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<std::string>
bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string> &params)
{
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<std::string> &params)
{
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<std::string> &params)
bool TreeSocket::Inbound_Server(std::deque<std::string> &params)
{
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];