change half-ticket time range from -120..240 to -60..600

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-02-01 15:13:01 +01:00
parent 19e4a36c70
commit 6248e51797

View File

@ -115,7 +115,7 @@ fn authenticate_2nd(
response: &str, response: &str,
) -> Result<AuthResult, Error> { ) -> Result<AuthResult, Error> {
let challenge: TfaChallenge = Ticket::<ApiTicket>::parse(&challenge_ticket)? let challenge: TfaChallenge = Ticket::<ApiTicket>::parse(&challenge_ticket)?
.verify_with_time_frame(public_auth_key(), "PBS", Some(userid.as_str()), -120..240)? .verify_with_time_frame(public_auth_key(), "PBS", Some(userid.as_str()), -60..600)?
.require_partial()?; .require_partial()?;
let _: () = crate::config::tfa::verify_challenge(userid, &challenge, response.parse()?)?; let _: () = crate::config::tfa::verify_challenge(userid, &challenge, response.parse()?)?;