ui: tfa/totp: fix setting issuer in secret URL

it's recommended to set the issuer for both, the get parameter and
the initial issuer label prefix[0].

[0]: https://github.com/google/google-authenticator/wiki/Key-Uri-Format#label

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-01-18 16:27:00 +01:00
parent 9b6bddb24c
commit ac163a7c18

View File

@ -29,7 +29,10 @@ Ext.define('PBS.window.AddTotp', {
}
let otpuri =
'otpauth://totp/' + encodeURIComponent(values.userid) +
'otpauth://totp/' +
encodeURIComponent(values.issuer) +
':' +
encodeURIComponent(values.userid) +
'?secret=' + values.secret +
'&period=' + values.step +
'&digits=' + values.digits +