mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Changed: Specify host too for login HTTP requests
This commit is contained in:
parent
ea12dd7969
commit
3e658f1a1f
1 changed files with 11 additions and 4 deletions
|
@ -2719,8 +2719,10 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|||
|
||||
string res;
|
||||
|
||||
std::string url = ClientCfg.ConfigFile.getVar("StartupHost").asString() + ClientCfg.ConfigFile.getVar("StartupPage").asString();
|
||||
|
||||
// ask server for salt
|
||||
if(!HttpClient.sendGet(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?cmd=ask&login="+login+"&lg="+ClientCfg.LanguageCode, "", pPM->isVerboseLog()))
|
||||
if(!HttpClient.sendGet(url + "?cmd=ask&login=" + login + "&lg=" + ClientCfg.LanguageCode, "", pPM->isVerboseLog()))
|
||||
return "Can't send (error code 60)";
|
||||
|
||||
if(pPM->isVerboseLog()) nlinfo("Sent request for password salt");
|
||||
|
@ -2760,7 +2762,8 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|||
{
|
||||
// R2 login sequence
|
||||
std::string cryptedPassword = CCrypt::crypt(password, Salt);
|
||||
if(!HttpClient.sendGet(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?cmd=login&login="+login+"&password="+cryptedPassword+"&clientApplication="+clientApp+"&cp=1"+"&lg="+ClientCfg.LanguageCode))
|
||||
|
||||
if(!HttpClient.sendGet(url + "?cmd=login&login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=1" + "&lg=" + ClientCfg.LanguageCode))
|
||||
return "Can't send (error code 2)";
|
||||
|
||||
// the response should contains the result code and the cookie value
|
||||
|
@ -2839,7 +2842,8 @@ 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(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?login="+login+"&password="+cryptedPassword+"&clientApplication="+clientApp+"&cp=1"))
|
||||
|
||||
if(!HttpClient.sendGet(url + "?login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=1"))
|
||||
return "Can't send (error code 2)";
|
||||
/*
|
||||
if(!send(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?login="+login+"&password="+password+"&clientApplication="+clientApp))
|
||||
|
@ -2944,7 +2948,10 @@ string selectShard(uint32 shardId, string &cookie, string &addr)
|
|||
|
||||
// send login + crypted password + client app and cp=1 (as crypted password)
|
||||
std::string cryptedPassword = CCrypt::crypt(LoginPassword, Salt);
|
||||
if(!HttpClient.sendGet(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?cmd=login&shardid="+toString(shardId)+"&login="+LoginLogin+"&password="+cryptedPassword+"&clientApplication="+ClientApp+"&cp=1"))
|
||||
|
||||
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"))
|
||||
return "Can't send (error code 11)";
|
||||
|
||||
string res;
|
||||
|
|
Loading…
Reference in a new issue