From fda24c47a8262388ada92722850a362da65aaa6e Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 8 Nov 2026 03:32:24 +0100 Subject: web: accept the serialized reels array and stop game loops on navigation The Rust SlotsView serializes reels as an array of chars, so the browser joins it instead of String(array). The crash chart, reel animation and roulette observer now stop when another screen takes over, and a returning crash screen rebuilds its detached canvas. Action buttons ignore a double click before the server view arrives. Also tightens the gateway session registry with a generation token, caps WebSocket messages at 64 KiB, uses the __Host- cookie prefix on HTTPS, and ships the systemd unit. --- webd/src/session.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'webd/src/session.rs') diff --git a/webd/src/session.rs b/webd/src/session.rs index 8a20721..3b34f47 100644 --- a/webd/src/session.rs +++ b/webd/src/session.rs @@ -575,7 +575,12 @@ mod tests { let id = "a".repeat(64); assert_eq!( cookie_id(&format!("other=1; {COOKIE_NAME}={id}; theme=dark")), - Some(id) + Some(id.clone()) + ); + assert_eq!( + cookie_id(&format!("{HOST_COOKIE_NAME}={id}")), + Some(id), + "the secure __Host- name is accepted" ); assert_eq!(cookie_id(&format!("{COOKIE_NAME}=short")), None); assert_eq!(cookie_id("other=1"), None); -- cgit v1.2.3