]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: tfa: use userid directly for totp url generation
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 5 Apr 2019 10:31:54 +0000 (12:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 5 Apr 2019 10:31:57 +0000 (12:31 +0200)
as name is now a displayfield, which by default does not
gets submitted, so just use the fixed userid directly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/dc/TFAEdit.js

index debaccfa6e7e7c8194accfc860b06d98b00b181c..83a33df99dcab3aafcb746e95f7f354425d82056 100644 (file)
@@ -25,7 +25,7 @@ Ext.define('PVE.window.TFAEdit', {
        }
 
        me.qrcode.makeCode(
-           'otpauth://totp/' + encodeURIComponent(values.name) +
+           'otpauth://totp/' + encodeURIComponent(me.userid) +
            '?secret=' + values.secret +
            '&period=' + values.step +
            '&digits=' + values.digits +
@@ -327,7 +327,6 @@ Ext.define('PVE.window.TFAEdit', {
                            items: [
                                {
                                    xtype: 'displayfield',
-                                   name: 'name',
                                    fieldLabel: gettext('User name'),
                                    cbind: {
                                        value: '{userid}'