mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1290 from keepassxreboot/fix/variable_check
Fix id and name check for form
This commit is contained in:
commit
a0bf794a3d
1 changed files with 4 additions and 2 deletions
|
|
@ -407,8 +407,10 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) {
|
|||
};
|
||||
|
||||
const form = inputs.length > 0 ? inputs[0].form : undefined;
|
||||
if (form && (acceptedOTPFields.some(f => form.className.includes(f) || form.id.includes(f) || form.name.includes(f))
|
||||
|| form.length === 6)) {
|
||||
if (form && (acceptedOTPFields.some(f => (form.className && form.className.includes(f))
|
||||
|| (form.id && typeof(form.id) === 'string' && form.id.includes(f))
|
||||
|| (form.name && typeof(form.name) === 'string' && form.name.includes(f))
|
||||
|| form.length === 6))) {
|
||||
// Use the form's elements
|
||||
addTotpFieldsToCombination(form.elements);
|
||||
} else if (inputs.length === 6 && inputs.every(i => i.inputMode === 'numeric' && i.pattern.includes('0-9'))) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue