Merge pull request #1363 from keepassxreboot/fix/apple_totp

Fix filling TOTP on Apple login page
This commit is contained in:
Sami Vänttinen 2021-07-04 08:19:15 +03:00 committed by GitHub
commit ef45c45838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -393,7 +393,10 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) {
if (totpInputs.length === 6) {
const combination = {
form: form,
totpInputs: totpInputs
totpInputs: totpInputs,
username: null,
password: null,
passwordInputs: []
};
combinations.push(combination);
@ -415,7 +418,8 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) {
|| 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'))) {
} else if (inputs.length === 6 && inputs.every(i => (i.inputMode === 'numeric' && i.pattern.includes('0-9'))
|| i.type === 'tel')) {
// No form is found, but input fields are possibly segmented TOTP fields
addTotpFieldsToCombination(inputs);
}