1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

is "like" password check

This commit is contained in:
Kyle Spearrin
2018-08-03 11:07:40 -04:00
parent 989c49152b
commit 6ddfd98fc4

View File

@@ -805,11 +805,14 @@ export default class AutofillService implements AutofillServiceInterface {
private loadPasswordFields(pageDetails: AutofillPageDetails, canBeHidden: boolean) { private loadPasswordFields(pageDetails: AutofillPageDetails, canBeHidden: boolean) {
const arr: AutofillField[] = []; const arr: AutofillField[] = [];
pageDetails.fields.forEach((f) => { 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); arr.push(f);
} }
}); });
return arr; return arr;
} }