summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 02:17:48 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 02:17:48 +0000
commitdc62c529ff4a3e9e876857d3eb357d2a5fa313aa (patch)
tree2f7c9e1f49a2561f34eed3ed5f9ee121c7600aae /src
parent78fa4165c90088523e623ab2b64ca0db0d19def0 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp10
1 files changed, 10 insertions, 0 deletions
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<std::string> &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)
{