]> git.scottworley.com Git - voter/commitdiff
Cookies don't need to be so big
authorScott Worley <scottworley@scottworley.com>
Sat, 19 Nov 2022 06:11:27 +0000 (22:11 -0800)
committerScott Worley <scottworley@scottworley.com>
Sat, 19 Nov 2022 06:11:27 +0000 (22:11 -0800)
src/main.rs

index 273a719740e2a49e7017fb93fe4ebb318d17f8a0..9d8daa5f66ce9c0e6960b48b4346e99fc7dc8c42 100644 (file)
@@ -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<PathBuf, cgi::Response> {
     let invalid_path = || cgi::text_response(404, "Invalid path");