]> git.proxmox.com Git - proxmox-backup.git/commitdiff
webauthn: correctly set origin when updating
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 18 Nov 2021 13:13:06 +0000 (14:13 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 19 Nov 2021 10:58:17 +0000 (11:58 +0100)
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>
src/api2/config/access/tfa.rs

index 2fad7e2f903edaf8d0b146d72483be06b7289119..e84016e369c87d6a6a63ff1f2d54a74dd94ba5d5 100644 (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();