From c68c7436596ec52628f3691d9beede271dda2e37 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Wed, 20 Jul 2016 15:33:37 +0200 Subject: [PATCH] only use exact match in pveRealmSelector store.findRecord returns the first match, and by default matches the beginning of the strings not the whole without this, with multple realms with the same name, but different tfa settings, the login window can show the tfa input box even when the selected realm has no tfa active Signed-off-by: Dominik Csapak --- www/manager6/form/RealmComboBox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/manager6/form/RealmComboBox.js b/www/manager6/form/RealmComboBox.js index 8ce767c03..4d9e5aa78 100644 --- a/www/manager6/form/RealmComboBox.js +++ b/www/manager6/form/RealmComboBox.js @@ -26,7 +26,8 @@ Ext.define('PVE.form.RealmComboBox', { needOTP: function(realm) { var me = this; - var rec = me.store.findRecord('realm', realm); + // use exact match + var rec = me.store.findRecord('realm', realm, 0, false, false, true); return rec && rec.data && rec.data.tfa ? rec.data.tfa : undefined; },