mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-29 21:14:18 +00:00
fix u2f context instantiation
don't use the appid for the origin if an origin was specified Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
c0312f3717
commit
54e97d35c1
@ -76,8 +76,12 @@ pub struct TfaConfig {
|
|||||||
|
|
||||||
/// Helper to get a u2f instance from a u2f config, or `None` if there isn't one configured.
|
/// Helper to get a u2f instance from a u2f config, or `None` if there isn't one configured.
|
||||||
fn get_u2f(u2f: &Option<U2fConfig>) -> Option<u2f::U2f> {
|
fn get_u2f(u2f: &Option<U2fConfig>) -> Option<u2f::U2f> {
|
||||||
u2f.as_ref()
|
u2f.as_ref().map(|cfg| {
|
||||||
.map(|cfg| u2f::U2f::new(cfg.appid.clone(), cfg.appid.clone()))
|
u2f::U2f::new(
|
||||||
|
cfg.appid.clone(),
|
||||||
|
cfg.origin.clone().unwrap_or_else(|| cfg.appid.clone()),
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper to get a u2f instance from a u2f config.
|
/// Helper to get a u2f instance from a u2f config.
|
||||||
|
Loading…
Reference in New Issue
Block a user