fix: send Warden HASH_RESULT fallback instead of skipping response

Previously, WotLK/TBC servers with no CR match would skip the
HASH_REQUEST response entirely to "avoid account bans". This caused
a guaranteed kick-on-timeout for ALL WotLK servers including
permissive ones like ChromieCraft/AzerothCore.

Now sends a best-effort fallback hash (SHA1 of module image or raw
data) for all server types. Permissive servers accept this and
continue the session normally. Strict servers (Warmane) will reject
it but only kick — same outcome as the previous skip behavior, just
faster feedback.

For strict servers, the correct fix remains providing a .cr file
with pre-computed seed→reply entries for each module.
This commit is contained in:
Kelsi 2026-03-31 01:10:43 -07:00
parent 681e25a4f2
commit f3f7511105

View file

@ -535,22 +535,15 @@ void WardenHandler::handleWardenData(network::Packet& packet) {
bool isTurtle = isActiveExpansion("turtle"); bool isTurtle = isActiveExpansion("turtle");
bool isClassic = (owner_.build <= 6005) && !isTurtle; bool isClassic = (owner_.build <= 6005) && !isTurtle;
if (!isTurtle && !isClassic) { // Previously we skipped the response for WotLK/TBC to avoid bans on strict
// WotLK/TBC (AzerothCore, etc.): strict servers BAN for wrong HASH_RESULT. // servers (e.g. Warmane). However, most servers (AzerothCore, ChromieCraft,
// Without a matching CR entry we cannot compute the correct hash // TrinityCore) are permissive and only kick — not ban — for wrong hashes.
// (requires executing the module's native init function). // Skipping causes a guaranteed kick-on-timeout, while sending a fallback
// Safest action: don't respond. Server will time-out and kick (not ban). // hash at least lets permissive servers continue the session.
LOG_WARNING("Warden: HASH_REQUEST seed=", seedHex, // For strict servers, provide a .cr file with the correct seed→reply.
" — no CR match, SKIPPING response to avoid account ban");
LOG_WARNING("Warden: To fix, provide a .cr file with the correct seed→reply entry for this module");
// Stay in WAIT_HASH_REQUEST — server will eventually kick.
break;
}
// Turtle/Classic: lenient servers (log-only penalties, no bans).
// Send a best-effort fallback hash so we can continue the handshake.
LOG_WARNING("Warden: No CR match (seed=", seedHex, LOG_WARNING("Warden: No CR match (seed=", seedHex,
"), sending fallback hash (lenient server)"); "), sending fallback hash");
std::vector<uint8_t> fallbackReply; std::vector<uint8_t> fallbackReply;
if (wardenLoadedModule_ && wardenLoadedModule_->isLoaded()) { if (wardenLoadedModule_ && wardenLoadedModule_->isLoaded()) {