src/server/rest.rs: improve logs for unauthorized request

This commit is contained in:
Dietmar Maurer
2019-02-17 17:18:44 +01:00
parent 54d15ab5c5
commit 8225aa2ff6
3 changed files with 14 additions and 6 deletions

View File

@ -454,10 +454,10 @@ fn check_auth(method: &hyper::Method, ticket: Option<String>, token: Option<Stri
if method != hyper::Method::GET {
if let Some(token) = token {
println!("CSRF prev token: {:?}", token);
println!("CSRF prevention token: {:?}", token);
verify_csrf_prevention_token(csrf_secret(), &username, &token, -300, ticket_lifetime)?;
} else {
bail!("");
bail!("missing CSRF prevention token");
}
}