]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_spanningtree Throw a ProtocolException if a server SQUITs a server it shouldn't
authorAttila Molnar <attilamolnar@hush.com>
Mon, 28 Jul 2014 12:48:50 +0000 (14:48 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Mon, 28 Jul 2014 12:48:50 +0000 (14:48 +0200)
src/modules/m_spanningtree/treesocket1.cpp

index 4e738488b1c85422c07e25ed80847d750b47bef4..1a8bdd06c67055468a17ab301c6d338f12054d5f 100644 (file)
@@ -154,6 +154,8 @@ CmdResult CommandSQuit::HandleServer(TreeServer* server, std::vector<std::string
                ret = CMD_FAILURE;
                server = server->GetParent();
        }
+       else if (quitting->GetParent() != server)
+               throw ProtocolException("Attempted to SQUIT a non-directly connected server or the parent");
 
        server->SQuitChild(quitting, params[1]);