mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 10:29:00 +00:00
Fix incorrect user identifier used in 0342f01580
iq uses lowercased version of user name, but patch was saving raw one. Found by: @Freagarach This was SVN commit r24733.
This commit is contained in:
1 parent
9df127f9d1
commit
3991dd6c38
1 file changed
+7
-3
@@ -378,7 +378,7 @@ void XmppClient::SendIqGetConnectionData(const std::string& jid, const std::stri
|
|||||||
connectionData->m_Password = password;
|
connectionData->m_Password = password;
|
||||||
glooxwrapper::IQ iq(gloox::IQ::Get, targetJID, m_client->getID());
|
glooxwrapper::IQ iq(gloox::IQ::Get, targetJID, m_client->getID());
|
||||||
iq.addExtension(connectionData);
|
iq.addExtension(connectionData);
|
||||||
m_connectionDataJid = jid;
|
m_connectionDataJid = iq.from().full();
|
||||||
m_connectionDataIqId = iq.id().to_string();
|
m_connectionDataIqId = iq.id().to_string();
|
||||||
DbgXMPP("SendIqGetConnectionData [" << tag_xml(iq) << "]");
|
DbgXMPP("SendIqGetConnectionData [" << tag_xml(iq) << "]");
|
||||||
m_client->send(iq);
|
m_client->send(iq);
|
||||||
@@ -840,11 +840,15 @@ bool XmppClient::handleIq(const glooxwrapper::IQ& iq)
|
|||||||
if (g_NetServer || !g_NetClient)
|
if (g_NetServer || !g_NetClient)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!m_connectionDataJid.empty() && m_connectionDataJid.compare(iq.from().full()) != 0)
|
if (!m_connectionDataJid.empty() && m_connectionDataJid.compare(iq.from().full()) != 0) {
|
||||||
|
LOGMESSAGE("XmppClient: Received connection data from invalid host: %s", iq.from().username());
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!m_connectionDataIqId.empty() && m_connectionDataIqId.compare(iq.id().to_string()) != 0)
|
if (!m_connectionDataIqId.empty() && m_connectionDataIqId.compare(iq.id().to_string()) != 0) {
|
||||||
|
LOGWARNING("XmppClient: Received connection data with invalid id");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!cd->m_Error.empty())
|
if (!cd->m_Error.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user