From 5ad225313dc842edaac26fcd2c3fcd4cede4f0d0 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 31 Mar 2026 01:18:58 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20revert=20Warden=20HASH=5FRESULT=20fallba?= =?UTF-8?q?ck=20=E2=80=94=20silence=20is=20correct=20behavior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ChromieCraft/AzerothCore tolerates no HASH_RESULT response (continues session without Warden checks), but immediately kicks on a WRONG hash. The previous commit sent a fallback SHA1 which the server rejected, breaking login that was working before. Restore the skip behavior for WotLK/TBC: stay silent on HASH_REQUEST when no CR match exists, and advance to WAIT_CHECKS so the rest of the session proceeds normally. Turtle/Classic servers still get the fallback hash since they're lenient about wrong values. --- src/game/warden_handler.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/game/warden_handler.cpp b/src/game/warden_handler.cpp index 3fc1a9ad..a5f38714 100644 --- a/src/game/warden_handler.cpp +++ b/src/game/warden_handler.cpp @@ -535,15 +535,19 @@ void WardenHandler::handleWardenData(network::Packet& packet) { bool isTurtle = isActiveExpansion("turtle"); bool isClassic = (owner_.build <= 6005) && !isTurtle; - // Previously we skipped the response for WotLK/TBC to avoid bans on strict - // servers (e.g. Warmane). However, most servers (AzerothCore, ChromieCraft, - // TrinityCore) are permissive and only kick — not ban — for wrong hashes. - // Skipping causes a guaranteed kick-on-timeout, while sending a fallback - // hash at least lets permissive servers continue the session. - // For strict servers, provide a .cr file with the correct seed→reply. + if (!isTurtle && !isClassic) { + // WotLK/TBC: don't respond to HASH_REQUEST without a valid CR match. + // ChromieCraft/AzerothCore tolerates the silence (no ban, no kick), + // but REJECTS a wrong hash and closes the connection immediately. + // Staying silent lets the server continue the session without Warden checks. + LOG_WARNING("Warden: HASH_REQUEST seed=", seedHex, + " — no CR match, skipping response (server tolerates silence)"); + wardenState_ = WardenState::WAIT_CHECKS; + break; + } LOG_WARNING("Warden: No CR match (seed=", seedHex, - "), sending fallback hash"); + "), sending fallback hash (lenient server)"); std::vector fallbackReply; if (wardenLoadedModule_ && wardenLoadedModule_->isLoaded()) {