ModernUO/Projects
Kamron Batman 91c8873b7a
refactor(accounts): make every password protection thread safe, drop the Argon2 carve-out
The worker was Argon2-only and kept its own protection instance. Both are now
unnecessary, but not for the reason the code gave.

CreateIsolated() was justified by the RNG, which was wrong. Argon2's Verify
is static-backed and stackalloc throughout, and the salt RNG is a stateless
syscall wrapper -- neither has state to race over. The real blocker was
HashAlgorithmPasswordProtection, which retains a HashAlgorithm carrying the
running digest across HashCore/HashFinal, shared through process-wide
singletons. Two threads there corrupt each other.

That is fixed at the source: hashing now goes through the one-shot static
APIs, which have no such state, allocate nothing, and produce identical
bytes. Literal digests are pinned in a test first, because these are compared
as strings against every account database -- any drift would lock out every
SHA and MD5 account at once.

PBKDF2 drew its iteration count from Utility.RandomMinMax, a shared
System.Random that is both thread-unsafe and game state. It now uses the
cryptographic RNG, matching the salt beside it.

With all three safe, the worker no longer needs to know which algorithm it is
running, and the dispatch conditions collapse to "is off-loop available". A
cheap digest now pays a thread hop it does not need, which costs login
latency we have already decided not to care about, and saves loop time we do.
2026-08-08 22:36:55 -07:00
..
Application fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
BuildTool fix: Require only runtime packages on Linux, and check ICU and tzdata the way the runtime does (#2561) 2026-08-07 15:03:08 -07:00
Logger fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
Server perf(login): verify Argon2 passwords on a parked worker thread 2026-08-08 10:50:25 -07:00
Server.Tests feat(network): allowlist false-positive IPs, escalate on behavior (#2556) 2026-07-30 23:12:17 -07:00
UOContent refactor(accounts): make every password protection thread safe, drop the Argon2 carve-out 2026-08-08 22:36:55 -07:00
UOContent.Tests refactor(accounts): make every password protection thread safe, drop the Argon2 carve-out 2026-08-08 22:36:55 -07:00