webauthn: correctly set origin when updating

with current proxmox-tfa this became a hard error, since origin and rp
are not both Strings anymore..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2021-11-18 14:13:06 +01:00
parent daaeea8b4b
commit f5e2b4726d

View File

@ -79,7 +79,7 @@ pub fn update_webauthn_config(
)?;
}
if let Some(ref rp) = webauthn.rp { wa.rp = rp.clone(); }
if let Some(ref origin) = webauthn.rp { wa.origin = origin.clone(); }
if let Some(ref origin) = webauthn.origin { wa.origin = origin.clone(); }
if let Some(ref id) = webauthn.id { wa.id = id.clone(); }
} else {
let rp = webauthn.rp.unwrap();