Core/Bnet: Send hostnames in portal requests for launcherlogin

This commit is contained in:
Shauren
2023-07-20 00:38:07 +02:00
parent 49305f5c1d
commit 8b426af763
5 changed files with 20 additions and 59 deletions

View File

@@ -232,11 +232,9 @@ uint32 Battlenet::Session::HandleLogon(authentication::v1::LogonRequest const* l
if (logonRequest->has_cached_web_credentials())
return VerifyWebCredentials(logonRequest->cached_web_credentials(), continuation);
std::string const& hostname = sLoginService.GetHostnameForClient(GetRemoteIpAddress());
challenge::v1::ChallengeExternalRequest externalChallenge;
externalChallenge.set_payload_type("web_auth_url");
externalChallenge.set_payload(Trinity::StringFormat("https://{}/bnetserver/login/", hostname));
externalChallenge.set_payload(Trinity::StringFormat("https://{}:{}/bnetserver/login/", sLoginService.GetHostnameForClient(GetRemoteIpAddress()), sLoginService.GetPort()));
Service<challenge::v1::ChallengeListener>(this).OnExternalChallenge(&externalChallenge);
return ERROR_OK;
}