From ae9be1b6ecd0c0823129bf6bb41149bd9404e902 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Fri, 18 Nov 2022 22:11:27 -0800 Subject: [PATCH] Cookies don't need to be so big --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 273a719..9d8daa5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use std::path::{Path, PathBuf}; const DATA_PATH: &str = "/var/lib/voter"; const COOKIE_NAME: &[u8] = b"__Secure-id"; -const COOKIE_LENGTH: usize = 32; +const COOKIE_LENGTH: usize = 12; fn validate_path(path: &str) -> Result { let invalid_path = || cgi::text_response(404, "Invalid path"); -- 2.44.1