mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-05 18:47:52 +01:00
tweaked autofill ignore settings for code review
This commit is contained in:
parent
307f59065b
commit
a2a994cb4d
@ -903,18 +903,16 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
// Removes all whitespace and _ characters
|
||||
const cleanedValue = value.toLowerCase().trim().replace(/[\s_]/g, '');
|
||||
// Removes all whitespace, _ and - characters
|
||||
const cleanedValue = value.toLowerCase().replace(/[\s_-]/g, '');
|
||||
|
||||
if (cleanedValue.indexOf('password') < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const ignoreList = ['onetimepassword', 'captcha', 'findanything']
|
||||
for (let index = 0; index < ignoreList.length; index++) {
|
||||
if (cleanedValue.indexOf(ignoreList[index]) > -1) {
|
||||
return false;
|
||||
}
|
||||
const ignoreList = ['onetimepassword', 'captcha', 'findanything'];
|
||||
if (ignoreList.some((i) => cleanedValue.indexOf(i) > -1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user