fix: resolve data race in token.RNG global

Wrap *rand.Rand in a mutex-protected SafeRand type to make the global
RNG safe for concurrent use across goroutines. The previous bare
*rand.Rand caused data races detected by go test -race.
This commit is contained in:
Houmgaor
2026-02-16 18:19:18 +01:00
parent 9b69564c49
commit a7b0deaa42
4 changed files with 44 additions and 22 deletions

View File

@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed save operation ordering - now saves data before session cleanup instead of after
- Fixed stale transmog/armor appearance shown to other players - user binary cache now invalidated when plate data is saved
- Fixed server crash when Discord relay receives messages with unsupported Shift-JIS characters (emoji, Lenny faces, cuneiform, etc.)
- Fixed data race in token.RNG global used concurrently across goroutines
### Security