diff --git a/source/lobby/XmppClient.cpp b/source/lobby/XmppClient.cpp index ae2ccd2cb6..144b084e79 100644 --- a/source/lobby/XmppClient.cpp +++ b/source/lobby/XmppClient.cpp @@ -867,7 +867,13 @@ bool XmppClient::handleIq(const glooxwrapper::IQ& iq) } if (gq) { - if (iq.from().full() == m_xpartamuppId && gq->m_Command == "register" && g_NetServer && !g_NetServer->GetUseSTUN()) + if (iq.from().full() != m_xpartamuppId) + { + LOGWARNING("XmppClient: Received game list response from unexpected sender: %s", iq.from().full()); + return true; + } + + if (gq->m_Command == "register" && g_NetServer && !g_NetServer->GetUseSTUN()) { if (gq->m_GameList.empty()) { @@ -895,6 +901,12 @@ bool XmppClient::handleIq(const glooxwrapper::IQ& iq) } if (bq) { + if (iq.from().full() != m_echelonId) + { + LOGWARNING("XmppClient: Received board list response from unexpected sender: %s", iq.from().full()); + return true; + } + if (bq->m_Command == "boardlist") { for (const glooxwrapper::Tag* const& t : m_BoardList) @@ -922,6 +934,12 @@ bool XmppClient::handleIq(const glooxwrapper::IQ& iq) } if (pq) { + if (iq.from().full() != m_echelonId) + { + LOGWARNING("XmppClient: Received profile response from unexpected sender: %s", iq.from().full()); + return true; + } + for (const glooxwrapper::Tag* const& t : m_Profile) glooxwrapper::Tag::free(t); m_Profile.clear();