From 7fcfc82a048bc167ad560c9325b5112cae85c9ca Mon Sep 17 00:00:00 2001 From: varjolintu Date: Sat, 13 Mar 2021 10:11:02 +0200 Subject: [PATCH] Add form length check if no TOTP ids are found --- keepassxc-browser/content/keepassxc-browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keepassxc-browser/content/keepassxc-browser.js b/keepassxc-browser/content/keepassxc-browser.js index a6808c2..19249fb 100755 --- a/keepassxc-browser/content/keepassxc-browser.js +++ b/keepassxc-browser/content/keepassxc-browser.js @@ -388,7 +388,8 @@ kpxcFields.getAllCombinations = async function(inputs) { // Adds segmented TOTP fields to the combination if found kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) { const form = inputs.length > 0 ? inputs[0].form : undefined; - if (acceptedOTPFields.some(f => form.className.includes(f) || form.id.includes(f) || form.name.includes(f))) { + if (acceptedOTPFields.some(f => form.className.includes(f) || form.id.includes(f) || form.name.includes(f)) + || form.length === 6) { const totpInputs = Array.from(form.elements).filter(e => e.nodeName === 'INPUT' && e.type !== 'password'); if (totpInputs.length === 6) { const combination = {