|
|
|
@ -2798,7 +2798,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|
|
|
|
if (!login.empty())
|
|
|
|
|
{
|
|
|
|
|
// ask server for salt
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=ask&login=" + login + "&lg=" + ClientCfg.LanguageCode, "", pPM->isVerboseLog()))
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=ask&cp=2&login=" + login + "&lg=" + ClientCfg.LanguageCode, "", pPM->isVerboseLog()))
|
|
|
|
|
return "Can't send (error code 60)";
|
|
|
|
|
|
|
|
|
|
if(pPM->isVerboseLog()) nlinfo("Sent request for password salt");
|
|
|
|
@ -2828,7 +2828,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// send login + crypted password + client app and cp=1 (as crypted password)
|
|
|
|
|
// send login + crypted password + client app and cp=2 (as crypted password)
|
|
|
|
|
if(!HttpClient.connectToLogin())
|
|
|
|
|
return "Can't connect (error code 63)";
|
|
|
|
|
|
|
|
|
@ -2843,13 +2843,13 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|
|
|
|
{
|
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(password, Salt);
|
|
|
|
|
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=1" + "&lg=" + ClientCfg.LanguageCode + customParameters))
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=2" + "&lg=" + ClientCfg.LanguageCode + customParameters))
|
|
|
|
|
return "Can't send (error code 2)";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// don't send login and password if empty
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&clientApplication=" + clientApp + "&cp=1" + "&lg=" + ClientCfg.LanguageCode + customParameters))
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&clientApplication=" + clientApp + "&cp=2" + "&lg=" + ClientCfg.LanguageCode + customParameters))
|
|
|
|
|
return "Can't send (error code 2)";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2930,7 +2930,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|
|
|
|
// standard ryzom login sequence
|
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(password, Salt);
|
|
|
|
|
|
|
|
|
|
if(!HttpClient.sendGet(url + "?login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=1"))
|
|
|
|
|
if(!HttpClient.sendGet(url + "?login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=2"))
|
|
|
|
|
return "Can't send (error code 2)";
|
|
|
|
|
/*
|
|
|
|
|
if(!send(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?login="+login+"&password="+password+"&clientApplication="+clientApp))
|
|
|
|
@ -3034,12 +3034,12 @@ string selectShard(uint32 shardId, string &cookie, string &addr)
|
|
|
|
|
if(LoginPassword.empty()) return "Empty Password (error code 9)";
|
|
|
|
|
if(ClientApp.empty()) return "Empty Client Application (error code 10)";
|
|
|
|
|
|
|
|
|
|
// send login + crypted password + client app and cp=1 (as crypted password)
|
|
|
|
|
// send login + crypted password + client app and cp=2 (as crypted password)
|
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(LoginPassword, Salt);
|
|
|
|
|
|
|
|
|
|
std::string url = ClientCfg.ConfigFile.getVar("StartupHost").asString() + ClientCfg.ConfigFile.getVar("StartupPage").asString();
|
|
|
|
|
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&shardid=" + toString(shardId) + "&login=" + LoginLogin + "&password=" + cryptedPassword + "&clientApplication=" + ClientApp + "&cp=1"))
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&shardid=" + toString(shardId) + "&login=" + LoginLogin + "&password=" + cryptedPassword + "&clientApplication=" + ClientApp + "&cp=2"))
|
|
|
|
|
return "Can't send (error code 11)";
|
|
|
|
|
|
|
|
|
|
string res;
|
|
|
|
|