mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Check placeholder attribute for ignoring a false positive with TOTP
This commit is contained in:
parent
880bad5469
commit
39139d698a
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const ignoreRegex = /(bank|coupon|postal|user|zip).*code|comment|author/i;
|
||||
const ignoreRegex = /(bank|coupon|postal|user|zip).*code|comment|author|error/i;
|
||||
const ignoredTypes = [ 'email', 'password', 'username' ];
|
||||
|
||||
const acceptedOTPFields = [
|
||||
|
|
@ -60,6 +60,7 @@ kpxcTOTPIcons.isValid = function(field, forced) {
|
|||
|| ignoredTypes.some(t => t === field.autocomplete)
|
||||
|| field.id.match(ignoreRegex)
|
||||
|| field.name.match(ignoreRegex)
|
||||
|| field.placeholder.match(ignoreRegex)
|
||||
|| field.readOnly) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue