From b59304a4df970f1d74b8e15b733f6754125b6fec Mon Sep 17 00:00:00 2001 From: Nyaaori <+@nyaaori.cat> Date: Sun, 25 Sep 2022 11:46:18 +0200 Subject: [PATCH] Reduce length of generated access tokens and session ids Reduces generated tokens and session ids down to 32 characters (~190 bits of entropy) in length --- src/api/client_server/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/client_server/mod.rs b/src/api/client_server/mod.rs index 65b7a100..6ed17e76 100644 --- a/src/api/client_server/mod.rs +++ b/src/api/client_server/mod.rs @@ -63,6 +63,6 @@ pub use user_directory::*; pub use voip::*; pub const DEVICE_ID_LENGTH: usize = 10; -pub const TOKEN_LENGTH: usize = 256; -pub const SESSION_ID_LENGTH: usize = 256; +pub const TOKEN_LENGTH: usize = 32; +pub const SESSION_ID_LENGTH: usize = 32; pub const AUTO_GEN_PASSWORD_LENGTH: usize = 15;