mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-23 15:42:24 +00:00
Validate password hash in WS auth [skip ci]
This commit is contained in:
parent
553d9aca6f
commit
5c2ac5ab24
@ -756,7 +756,12 @@ bool WorldServer::HandleNewLoginserverRegisteredOnly(
|
||||
|
||||
bool does_world_server_pass_authentication_check = (
|
||||
world_registration.server_admin_account_name == this->GetAccountName() &&
|
||||
world_registration.server_admin_account_password == this->GetAccountPassword()
|
||||
eqcrypt_verify_hash(
|
||||
GetAccountName(),
|
||||
GetAccountPassword(),
|
||||
world_registration.server_admin_account_password,
|
||||
server.options.GetEncryptionMode()
|
||||
)
|
||||
);
|
||||
|
||||
this
|
||||
@ -842,7 +847,12 @@ bool WorldServer::HandleNewLoginserverInfoUnregisteredAllowed(
|
||||
|
||||
bool does_world_server_pass_authentication_check = (
|
||||
world_registration.server_admin_account_name == this->GetAccountName() &&
|
||||
world_registration.server_admin_account_password == this->GetAccountPassword()
|
||||
eqcrypt_verify_hash(
|
||||
GetAccountName(),
|
||||
GetAccountPassword(),
|
||||
world_registration.server_admin_account_password,
|
||||
server.options.GetEncryptionMode()
|
||||
)
|
||||
);
|
||||
|
||||
bool does_world_server_have_non_empty_credentials = (
|
||||
@ -852,7 +862,6 @@ bool WorldServer::HandleNewLoginserverInfoUnregisteredAllowed(
|
||||
|
||||
if (does_world_server_have_non_empty_credentials) {
|
||||
if (does_world_server_pass_authentication_check) {
|
||||
|
||||
this->SetIsServerAuthorized(true);
|
||||
|
||||
LogInfo(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user