[pve-devel] [PATCH manager] fix #2177: use getValue() to get otp value

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Apr 16 13:37:50 CEST 2019


as '.value' isn't always valid

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---

Don't ask me why. The key events sent by the yubikey look normal:

  Event: time 1555413939.543914, -------------- SYN_REPORT ------------
  Event: time 1555413939.551918, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
  Event: time 1555413939.551918, type 1 (EV_KEY), code 28 (KEY_ENTER), value 1
  Event: time 1555413939.551918, -------------- SYN_REPORT ------------
  Event: time 1555413939.559923, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
  Event: time 1555413939.559923, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
  Event: time 1555413939.559923, -------------- SYN_REPORT ------------

but extjs seems to be allergic to them... maybe there isn't enough time
between the keydown and the keyup?

 www/manager6/window/LoginWindow.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/window/LoginWindow.js b/www/manager6/window/LoginWindow.js
index 65fe14cb..0f7ae345 100644
--- a/www/manager6/window/LoginWindow.js
+++ b/www/manager6/window/LoginWindow.js
@@ -275,7 +275,7 @@ Ext.define('PVE.window.TFALoginWindow', {
 	login: function() {
 	    var me = this;
 	    var view = me.getView();
-	    view.onLogin(me.lookup('otpField').value);
+	    view.onLogin(me.lookup('otpField').getValue());
 	    view.close();
 	},
 	cancel: function() {
-- 
2.11.0





More information about the pve-devel mailing list