[server] ReplayHeader.seed is i64 but client Replay.seed is u64 — high-bit seeds rejected #32
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Files
solitaire_server/src/replays.rsline 39solitaire_data/src/replay.rsline 125Description
The client's
Replay.seedisu64. The server deserializes the same JSON field intoReplayHeader.seed: i64. For any seed value exceedingi64::MAX(9,223,372,036,854,775,807), serde_json returns a deserialization error and the upload fails with HTTP 400. Seeds derived fromu64RNG with high-bit entropy (e.g. hash-based or system-time-derived seeds) can exceed this limit. When they do, the replay upload silently fails with no error surfaced in the client UI.Fix
Change
ReplayHeader.seedtou64, or add a#[serde(deserialize_with = "...")]helper that accepts both signed and unsigned integer representations.