From 705abeb6439fe1a7b8502fb8d170f0396581b9e4 Mon Sep 17 00:00:00 2001 From: Radical Date: Thu, 1 May 2025 20:17:59 +0200 Subject: [PATCH] fix: fix password regex this should probably be moved to its own function so we can change it on the fly --- src/api/v1/auth/login.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/v1/auth/login.rs b/src/api/v1/auth/login.rs index d484c4e..54d163b 100644 --- a/src/api/v1/auth/login.rs +++ b/src/api/v1/auth/login.rs @@ -43,7 +43,7 @@ pub async fn response(mut payload: web::Payload, data: web::Data) -> Resul let username_regex = Regex::new(r"[a-zA-Z0-9.-_]").unwrap(); // Password is expected to be hashed using SHA3-384 - let password_regex = Regex::new(r"/[0-9a-f]{96}/i").unwrap(); + let password_regex = Regex::new(r"[0-9a-f]{96}").unwrap(); if !password_regex.is_match(&login_information.password) { return Ok(HttpResponse::Forbidden().json(r#"{ "password_hashed": false }"#));