1
0
Fork 0
mirror of https://git.42l.fr/neil/sncf.git synced 2024-05-09 17:26:36 +02:00

fixing the cookie token regex

This commit is contained in:
bleh 2020-08-22 12:43:21 +02:00
parent fc32720003
commit c61cd417fd

View file

@ -161,7 +161,7 @@ pub async fn forward_register(
// if the user has already generated an admin token, redirect too // if the user has already generated an admin token, redirect too
if let Some(token) = has_admintoken(&req) { if let Some(token) = has_admintoken(&req) {
lazy_static! { lazy_static! {
static ref RE: Regex = Regex::new(r#"sncf_admin_token=(?P<token>[0-9A-Za-z]*)"#).expect("Error while parsing the sncf_admin_token regex"); static ref RE: Regex = Regex::new(r#"sncf_admin_token=(?P<token>[0-9A-Za-z_]*)"#).expect("Error while parsing the sncf_admin_token regex");
} }
let admin_token = RE.captures(&token) let admin_token = RE.captures(&token)
.ok_or_else(|| { .ok_or_else(|| {