Skip to content

Warden fixes#312

Open
Krilliac wants to merge 2 commits intomangoszero:masterfrom
Krilliac:master
Open

Warden fixes#312
Krilliac wants to merge 2 commits intomangoszero:masterfrom
Krilliac:master

Conversation

@Krilliac
Copy link
Copy Markdown
Contributor

@Krilliac Krilliac commented May 5, 2026

This change is Reviewable

claude and others added 2 commits May 5, 2026 17:11
Address issues from Warden research pass on the 1.12.1 (build 5875) path:

- WardenWin::InitializeModule(): zero-initialize WardenInitModuleRequest and
  compute the three block checksums after all covered fields have been
  assigned. Also corrects CheckSumm2 starting offset (was pointing at Unk2
  in block 1 instead of Unk3 in block 2).
- WardenWin::RequestData(): validate that DB metadata is present before
  scheduling a check id, drop unknown ids with a clear log entry, and bail
  out cleanly when no checks are loaded for the client build.
- WardenWin::HandleData(): reject responses received outside
  STATE_REQUESTED_DATA, validate Length against remaining buffer before
  scanning, bounds-check every memcmp/skip, abort cleanly on unknown check
  types, catch ByteBufferException on underflow, and log every failed
  check (not only the last one) while applying the strictest configured
  penalty.
- WardenCheckMgr::GetWardenCheckIds(): partition checks so MEM_CHECK and
  MODULE_CHECK go through the memory queue and everything else goes through
  the other queue. Skip TIMING_CHECK rows because RequestData() always
  appends a synthetic TIMING_CHECK per cycle.
- WardenCheckMgr::LoadWardenChecks(): probe for the optional `groupid`
  column and, if present, round-robin selection across groups so similar
  checks are not all consumed back-to-back.
- WorldSession::HandleWardenDataOpcode(): centralize state validation via
  Warden::IsValidIncomingOpcode(), implement WARDEN_CMSG_MEM_CHECKS_RESULT
  (apply penalty), make WARDEN_CMSG_MODULE_FAILED actionable, and drain
  the packet on every error path.
- mangosd.conf.dist.in: default Warden.ClientCheckFailAction to 0
  (log-only) so it matches the code default. Document the recommendation
  to keep log-only until Warden has been validated against real clients.
Fix Warden integration: init checksums, scheduling, validation
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@AppVeyorBot
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants