is "like" password check

This commit is contained in:
Kyle Spearrin 2018-08-03 11:07:40 -04:00
parent 989c49152b
commit 6ddfd98fc4
1 changed files with 5 additions and 2 deletions

View File

@ -805,11 +805,14 @@ export default class AutofillService implements AutofillServiceInterface {
private loadPasswordFields(pageDetails: AutofillPageDetails, canBeHidden: boolean) {
const arr: AutofillField[] = [];
pageDetails.fields.forEach((f) => {
if (!f.disabled && !f.readonly && f.type === 'password' && (canBeHidden || f.viewable)) {
const isPassword = f.type === 'password';
const isLikePassword = f.type === 'text' && ((f.htmlID != null && f.htmlID.toLowerCase() === 'password') ||
(f.htmlName != null && f.htmlName.toLowerCase() === 'password') ||
(f.placeholder != null && f.placeholder.toLowerCase() === 'password'));
if (!f.disabled && !f.readonly && (isPassword || isLikePassword) && (canBeHidden || f.viewable)) {
arr.push(f);
}
});
return arr;
}