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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user