3 Commits

Author SHA1 Message Date
Kelsi
aaebd4fa50 fix(auth): restore legacy proof security-flags byte, default Turtle to protocol 8
PR #101 dropped the trailing security-flags byte from the legacy LOGON_PROOF,
but mangos-family realmd reads the 1.11+ proof as a fixed-size struct that
includes it, so protocol-3 logins against stock vanilla realms would stall.
Also flip the Turtle profile to auth protocol 8 (vmangos-derived servers
require it) so the first login attempt no longer fails and retries; the
vanilla-family fallback chain still tries protocol 3 second.
2026-07-16 00:10:56 -07:00
Josh Anderson
d57433990b fix(auth): fall back for Turtle security extensions 2026-07-15 17:20:50 -05:00
Kelsi
64ece68aa4 feat(auth): fall back to the other vanilla auth protocol on mismatch
Vanilla 1.12 servers disagree on the auth protocol byte — vmangos-derived
realms speak 8, stock mangos/cmangos speak 3 — and a profile can only name
one, so pointing the classic profile at the other kind hard-failed at login.
Classic/Turtle now retry once on the alternate byte when the failure looks
protocol-shaped (unparseable handshake, version rejection, drop during
challenge) and never when credentials were rejected, so a wrong password
can't trigger a second lockout-provoking attempt.

Also fixes the realm-list recovery heuristic from #100: it only fired when
the shifted parse left a non-empty address, so vanilla realms sending flags=0
(both name and address parse empty) silently produced garbage fields instead.
Keyed on the empty name alone, and covered by new realm-list parser tests.
2026-07-14 01:29:37 -07:00