From: Scott Worley Date: Sat, 19 Nov 2022 06:11:27 +0000 (-0800) Subject: Cookies don't need to be so big X-Git-Tag: v0.2.0~15 X-Git-Url: http://git.scottworley.com/voter/commitdiff_plain/ae9be1b6ecd0c0823129bf6bb41149bd9404e902 Cookies don't need to be so big --- 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");