From ac163a7c18db8898d84293d374577d6838b3b8c4 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 18 Jan 2021 16:27:00 +0100 Subject: [PATCH] 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 --- www/window/AddTotp.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/window/AddTotp.js b/www/window/AddTotp.js index 15b42740..0141707a 100644 --- a/www/window/AddTotp.js +++ b/www/window/AddTotp.js @@ -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 +