]> git.proxmox.com Git - pve-manager.git/commit
ui: mobile: fix totp login
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 14 Dec 2023 09:55:16 +0000 (10:55 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 14:38:13 +0000 (16:38 +0200)
commit84505f2de86f52c55b12fc846f7821af3b56a863
treecfc5754729d41d4d58da869da1c71a51b0d95cdf
parent21e5ae5b36de7834911c3e4de2dc1bee34c44c5d
ui: mobile: fix totp login

Log-in with TOTP enabled account on mobile was broken due to these two
commits:
- pve-manager: 509d7a20 ("mobile ui: implement dummy message box and
  scrip loader")
- pve-access-control: cb64967 ("api: drop old verify_tfa api call")

The pve-manager one overwrote the Ext.MessageBox and Ext.Msg classes
and thus removed the Ext.MessageBox.OKCANCEL constant that represented
the buttons of popup messages (without those no buttons on message
boxes where shown).

This override did not work as intended, as we still  showed the
message box by accident, because at that point the Ext.MessageBox was
already initialized (so it was overwritten), but Ext.Msg was not (this
happens later).

And the pve-access-control removed the old tfa verify api (which is
now done via the /access/ticket api)

So to fix that, we have to adapt to the api changes and restore the
stock Ext.MessageBox and Ext.Msg classes by removing the overrides
(i couldn't find where we would need those)

We still cannot handle u2f/WebAuthn or recovery methods though.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/mobile/Login.js
www/mobile/Toolkit.js