From dc62c529ff4a3e9e876857d3eb357d2a5fa313aa Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 27 Aug 2007 02:17:48 +0000 Subject: Paranoia: Check for UUID collision on UID reciept, remove both clients if a collision occurs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7858 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 90f6152cd..7b2605254 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -932,6 +932,16 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa return true; } + userrec *u = this->Instance->FindUUID(params[0]); + + if (u) + { + /* barf! */ + userrec::QuitUser(this->Instance, u, "UID collision (?!)"); + this->WriteLine(std::string(":")+this->Instance->Config->ServerName+" KILL "+params[0]+" :Invalid client introduction (UID collision (?!))"); + return true; + } + /* Check parameters for validity before introducing the client, discovered by dmb */ if (!age) { -- cgit v1.2.3