summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 67908c414..e93dece5f 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -394,7 +394,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
{
if (params.size() != 2)
{
- SendError("Protocol violation: NICK message without TS - :"+who->uuid+" NICK "+params[0]);
+ SendError("Protocol violation: Wrong number of parameters for NICK message");
return;
}
@@ -404,6 +404,12 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
return;
}
+ if ((isdigit(params[0][0])) && (params[0] != who->uuid))
+ {
+ SendError("Protocol violation: User changing nick to an invalid UID - " + params[0]);
+ return;
+ }
+
/* Update timestamp on user when they change nicks */
who->age = atoi(params[1].c_str());