diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-05 00:42:36 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-05 00:42:36 +0000 |
commit | 897fa5791128a9797157584a04af9b7a66924655 (patch) | |
tree | 13de1ab7ca3f186b120a9302b4538a4f32113388 /src | |
parent | fa933d7bdcb3e5fecce260f5456a00dda80f21e2 (diff) |
Some more safety checks to catch out invalid client introductions (e.g. from atheme when its too old (for some reason its no longer checking the protocol ID for this))
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10623 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 0aaabfd81..9ddc154c6 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -48,13 +48,22 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa this->WriteLine(std::string(":")+this->ServerInstance->Config->GetSID()+" KILL "+params[0]+" :Invalid client introduction (Unknown server "+source+")"); return true; } - /* Check parameters for validity before introducing the client, discovered by dmb */ - if (!age_t) + else if (!age_t) { this->WriteLine(std::string(":")+this->ServerInstance->Config->GetSID()+" KILL "+params[0]+" :Invalid client introduction (Invalid TS?)"); return true; } + else if (!signon) + { + this->WriteLine(std::string(":")+this->ServerInstance->Config->GetSID()+" KILL "+params[0]+" :Invalid client introduction (Invalid signon?)"); + return true; + } + else if (params[8][0] != '+') + { + this->WriteLine(std::string(":")+this->ServerInstance->Config->GetSID()+" KILL "+params[0]+" :Invalid client introduction (Malformed MODE sequence?)"); + return true; + } /* check for collision */ user_hash::iterator iter = this->ServerInstance->Users->clientlist->find(params[2]); |