Changeset View
Changeset View
Standalone View
Standalone View
source/lobby/XmppClient.cpp
Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | void XmppClient::SendIqGetProfile(const std::string& player) | ||||
iq.addExtension(b); | iq.addExtension(b); | ||||
DbgXMPP("SendIqGetProfile [" << tag_xml(iq) << "]"); | DbgXMPP("SendIqGetProfile [" << tag_xml(iq) << "]"); | ||||
m_client->send(iq); | m_client->send(iq); | ||||
} | } | ||||
/** | /** | ||||
* Request the Connection data (ip, port...) from the server. | * Request the Connection data (ip, port...) from the server. | ||||
*/ | */ | ||||
void XmppClient::SendIqGetConnectionData(const std::string& jid, const std::string& password, bool localIP) | void XmppClient::SendIqGetConnectionData(const std::string& jid, const std::string& password, const std::string& clientSalt, bool localIP) | ||||
Stan: Shouldn't we send the already hashed password to that function? | |||||
Done Inline ActionsWe do. The salt is for the server. wraitii: We do. The salt is for the server. | |||||
{ | { | ||||
glooxwrapper::JID targetJID(jid); | glooxwrapper::JID targetJID(jid); | ||||
ConnectionData* connectionData = new ConnectionData(); | ConnectionData* connectionData = new ConnectionData(); | ||||
connectionData->m_Password = password; | connectionData->m_Password = password; | ||||
connectionData->m_ClientSalt = clientSalt; | |||||
connectionData->m_IsLocalIP = localIP ? "1" : "0"; | connectionData->m_IsLocalIP = localIP ? "1" : "0"; | ||||
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 = iq.from().full(); | 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); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 587 Lines • ▼ Show 20 Lines | if (cd) | ||||
ConnectionData* connectionData = new ConnectionData(); | ConnectionData* connectionData = new ConnectionData(); | ||||
connectionData->m_Error = "banned"; | connectionData->m_Error = "banned"; | ||||
response.addExtension(connectionData); | response.addExtension(connectionData); | ||||
m_client->send(response); | m_client->send(response); | ||||
return true; | return true; | ||||
} | } | ||||
if (!g_NetServer->CheckPasswordAndIncrement(CStr(cd->m_Password.to_string()), iq.from().username())) | if (!g_NetServer->CheckPasswordAndIncrement(iq.from().username(), cd->m_Password.to_string(), cd->m_ClientSalt.to_string())) | ||||
{ | { | ||||
glooxwrapper::IQ response(gloox::IQ::Result, iq.from(), iq.id()); | glooxwrapper::IQ response(gloox::IQ::Result, iq.from(), iq.id()); | ||||
ConnectionData* connectionData = new ConnectionData(); | ConnectionData* connectionData = new ConnectionData(); | ||||
connectionData->m_Error = "invalid_password"; | connectionData->m_Error = "invalid_password"; | ||||
response.addExtension(connectionData); | response.addExtension(connectionData); | ||||
m_client->send(response); | m_client->send(response); | ||||
▲ Show 20 Lines • Show All 529 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Shouldn't we send the already hashed password to that function?