mirror of
https://github.com/bitwarden/browser
synced 2024-12-28 02:43:04 +01:00
beefed up the restrictions on what is considered isLikePassword for autofill
This commit is contained in:
parent
16354f2693
commit
307f59065b
2
jslib
2
jslib
@ -1 +1 @@
|
|||||||
Subproject commit 3bf322a904cd7ccb8c7e77edbecf8e152feb7364
|
Subproject commit f30d6f8027055507abfdefd1eeb5d9aab25cc601
|
@ -903,16 +903,20 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
if (value == null) {
|
if (value == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const lowerValue = value.toLowerCase();
|
// Removes all whitespace and _ characters
|
||||||
if (lowerValue.indexOf('onetimepassword') >= 0) {
|
const cleanedValue = value.toLowerCase().trim().replace(/[\s_]/g, '');
|
||||||
|
|
||||||
|
if (cleanedValue.indexOf('password') < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (lowerValue.indexOf('password') < 0) {
|
|
||||||
|
const ignoreList = ['onetimepassword', 'captcha', 'findanything']
|
||||||
|
for (let index = 0; index < ignoreList.length; index++) {
|
||||||
|
if (cleanedValue.indexOf(ignoreList[index]) > -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (lowerValue.indexOf('captcha') >= 0) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
const isLikePassword = () => {
|
const isLikePassword = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user