Skip to content

Commit

Permalink
Merge pull request #1363 from keepassxreboot/fix/apple_totp
Browse files Browse the repository at this point in the history
Fix filling TOTP on Apple login page
  • Loading branch information
Sami Vänttinen committed Jul 4, 2021
2 parents 3db23e9 + 00b9a31 commit ef45c45
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions keepassxc-browser/content/keepassxc-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down

0 comments on commit ef45c45

Please sign in to comment.