Auth: include CRC in legacy proof; extend Turtle integrity set

This commit is contained in:
Kelsi 2026-02-13 01:41:59 -08:00
parent 5435796a98
commit 492703be36
5 changed files with 48 additions and 13 deletions

View file

@ -283,14 +283,20 @@ void AuthHandler::sendLogonProof() {
}
}
auto packet = LogonProofPacket::build(A, M1, securityFlags_, crcHashPtr, pinClientSaltPtr, pinHashPtr);
socket->send(packet);
if (clientInfo.protocolVersion < 8) {
// Legacy proof format: no securityFlags byte on the wire, but CRC/integrity hash still applies.
auto packet = LogonProofPacket::buildLegacy(A, M1, crcHashPtr);
socket->send(packet);
} else {
auto packet = LogonProofPacket::build(A, M1, securityFlags_, crcHashPtr, pinClientSaltPtr, pinHashPtr);
socket->send(packet);
if ((securityFlags_ & 0x04) && clientInfo.protocolVersion >= 8) {
// TrinityCore-style Google Authenticator token: send immediately after proof.
const std::string token = pendingSecurityCode_;
auto tokPkt = AuthenticatorTokenPacket::build(token);
socket->send(tokPkt);
if (securityFlags_ & 0x04) {
// TrinityCore-style Google Authenticator token: send immediately after proof.
const std::string token = pendingSecurityCode_;
auto tokPkt = AuthenticatorTokenPacket::build(token);
socket->send(tokPkt);
}
}
setState(AuthState::PROOF_SENT);