diff options
| author | historia <[not public]> | 2026-09-19 03:15:59 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-19 03:15:59 -0400 |
| commit | 0e60567a7a0addb9421769ee7be7853bfa8788cb (patch) | |
| tree | 7645112db0e4eae95b8a83c1e4f9aab38bede655 /internal/admin/server.go | |
| parent | cc33072eced3d5460512c09c42ec4531c807d7af (diff) | |
| download | thehouseoficarus-0e60567a7a0addb9421769ee7be7853bfa8788cb.tar.gz | |
refactor: simplifcation, change how rooms are stored in player yaml, remove legacy code
Diffstat (limited to 'internal/admin/server.go')
| -rw-r--r-- | internal/admin/server.go | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/internal/admin/server.go b/internal/admin/server.go index 9c62249..96b5981 100644 --- a/internal/admin/server.go +++ b/internal/admin/server.go @@ -754,12 +754,8 @@ func (s *AdminServer) handleLogin(w http.ResponseWriter, r *http.Request) { } // Expensive password hashing stays off the owner. Reload the account - // inside the task so an upgrade cannot overwrite a concurrent character - // rename/create or a password/admin change made since authentication. - var upgradedHash string - if player.NeedsRehash(acc.PasswordHash) { - upgradedHash, _ = player.HashPassword(password) - } + // inside the task so a concurrent character rename/create or a + // password/admin change made since authentication is not overwritten. authorized := false if !s.runOnOwner(func() { current, err := s.accountStore.LoadAccount(account) @@ -767,12 +763,6 @@ func (s *AdminServer) handleLogin(w http.ResponseWriter, r *http.Request) { return } authorized = true - if upgradedHash != "" { - current.PasswordHash = upgradedHash - if err := s.accountStore.SaveAccount(current); err != nil { - log.Printf("admin login: password rehash save for %s: %v", account, err) - } - } }) { writeJSONError(w, "game is shutting down", http.StatusServiceUnavailable) return |
