diff options
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 |
