fix: fix password regex
this should probably be moved to its own function so we can change it on the fly
This commit is contained in:
parent
1646e60e65
commit
705abeb643
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ pub async fn response(mut payload: web::Payload, data: web::Data<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 }"#));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue