Fix ENV_HASH not working correctly.

This commit is contained in:
2025-06-23 15:01:12 +03:00
parent 94d377c0c2
commit ac99cef842
4 changed files with 11 additions and 6 deletions

View File

@@ -64,6 +64,7 @@ module Players
def self.authorized?(username, pass)
digest = XXhash.xxh32(pass, ENV_HASH["SALT"])
Logman.log "Authorized: #{username} & #{digest}\n"
player = self[username]
player && player[:digest].to_i == digest.to_i ? player : false
end