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