diff --git a/keepassxc-browser/content/totp-field.js b/keepassxc-browser/content/totp-field.js index 69612d0..0d15dde 100644 --- a/keepassxc-browser/content/totp-field.js +++ b/keepassxc-browser/content/totp-field.js @@ -19,6 +19,10 @@ const acceptedOTPFields = [ 'verification_pin' ]; +const acceptedParents = [ + '.mfa-verify', +]; + var kpxcTOTPIcons = {}; kpxcTOTPIcons.icons = []; @@ -43,7 +47,7 @@ kpxcTOTPIcons.isAcceptedTOTPField = function(field) { // Checks if the field id, name or placeholder includes some of the acceptedOTPFields but not any from ignoredTypes if (autocomplete === 'one-time-code' - || (acceptedOTPFields.some(f => (id && id.includes(f)) || (name && name.includes(f) || placeholder && placeholder.includes(f)))) + || (acceptedOTPFields.some(f => (id && id.includes(f)) || (name && name.includes(f) || placeholder && placeholder.includes(f))) || acceptedParents.some(s => field.closest(s))) && !ignoredTypes.some(f => (id && id.includes(f)) || (name && name.includes(f) || placeholder && placeholder.includes(f)))) { return true; }