mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #2387 from keepassxreboot/fix/adjust_segmented_totp
Adjust segmented TOTP detection
This commit is contained in:
commit
71cde7bc9f
1 changed files with 2 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) {
|
|||
|
||||
let exceptionFound = false;
|
||||
|
||||
// Returns true if all 6 inputs are numeric, tel or text/number with maxLength of 1.
|
||||
// Returns true if all 6 inputs are numeric, tel or text/number with maxLength of 1, or maxLength not defined.
|
||||
// If ignoreFieldCount is true, number of TOTP fields are allowed to differ from the default (6),
|
||||
// but 4 at minimum must exist.
|
||||
const areFieldsSegmentedTotp = function(totpInputs, ignoreFieldCount = false) {
|
||||
|
|
@ -106,7 +106,7 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) {
|
|||
totpInputs.every(
|
||||
input =>
|
||||
((input.inputMode === 'numeric' || input.inputMode === '') && input.pattern.includes('0-9')) ||
|
||||
((input.type === 'text' || input.type === 'number') && input.maxLength === 1) ||
|
||||
((input.type === 'text' || input.type === 'number') && (input.maxLength === 1 || input.maxLength === -1)) ||
|
||||
input.type === 'tel'
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue