look for password fields from HtmlInfo attributes

This commit is contained in:
Kyle Spearrin 2018-04-26 00:03:47 -04:00
parent f7570122c6
commit c308d7a610
1 changed files with 14 additions and 0 deletions

View File

@ -304,6 +304,20 @@ namespace Bit.Android.Autofill
f.InputType.HasFlag(InputTypes.TextVariationVisiblePassword) || f.InputType.HasFlag(InputTypes.TextVariationVisiblePassword) ||
f.InputType.HasFlag(InputTypes.TextVariationWebPassword); f.InputType.HasFlag(InputTypes.TextVariationWebPassword);
if(!inputTypePassword && f.HtmlInfo != null && f.HtmlInfo.Tag == "input" &&
(f.HtmlInfo.Attributes?.Any() ?? false))
{
foreach(var a in f.HtmlInfo.Attributes)
{
var key = a.First as Java.Lang.String;
var val = a.Second as Java.Lang.String;
if(key != null && val != null && key.ToString() == "type" && val.ToString() == "password")
{
return true;
}
}
}
return inputTypePassword && !ValueContainsAnyTerms(f.IdEntry, _ignoreSearchTerms) && return inputTypePassword && !ValueContainsAnyTerms(f.IdEntry, _ignoreSearchTerms) &&
!ValueContainsAnyTerms(f.Hint, _ignoreSearchTerms); !ValueContainsAnyTerms(f.Hint, _ignoreSearchTerms);
} }