mirror of
https://git.42l.fr/neil/sncf.git
synced 2024-06-16 14:35:00 +02:00
fixing cookie regex again
This commit is contained in:
parent
5a6f600806
commit
1c02c142c9
|
@ -164,7 +164,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(|| {
|
||||||
|
|
Loading…
Reference in a new issue