ModernUO/Projects/UOContent/Accounting
Kamron Batman 970cd42699 fix(accounts): derive the password phrase from the target algorithm
SetPassword salted the phrase with the username according to the OUTGOING
algorithm but stored the result under the INCOMING one. SHA1 and SHA2 prepend
the username; Argon2 and PBKDF2 do not. Two live lockouts followed:

- A ServUO-imported SHA2 account logging in with the default Argon2 config was
  'upgraded' to argon2(username + password) and tagged Argon2. The next login
  rebuilt the phrase as bare password and could never match. One successful
  login, then permanent lockout.
- SetPassword also runs from the Account constructor, before _passwordAlgorithm
  is assigned, so it is still None. Creating an account under SHA1 or SHA2
  hashed the bare password and tagged it with an algorithm that re-adds the
  username -- a brand-new account that could never log in.

Derive the phrase from the algorithm being written. Also configures Accounts
persistence in the UOContent test fixture so an Account can be constructed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 16:24:37 -07:00
..
Security fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
Account.cs fix(accounts): derive the password phrase from the target algorithm 2026-08-07 16:24:37 -07:00
Account.Migrations.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
AccountComment.cs fix(core): Fixes accounts and moves it to codegen (#644) 2021-06-05 19:39:16 -07:00
AccountHandler.cs feat(network): allowlist false-positive IPs, escalate on behavior (#2556) 2026-07-30 23:12:17 -07:00
Accounts.cs fix: Fixes libdeflate gc pin issue (#1794) 2024-05-25 18:11:46 -07:00
AccountTag.cs fix(core): Fixes accounts and moves it to codegen (#644) 2021-06-05 19:39:16 -07:00
IPasswordProtection.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00