From eac1c6f1d87730fddd933d9a39b1e73226728bdf Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Fri, 2 Oct 2020 12:19:20 +0200 Subject: Allow matching password fields based on hints only (#1129) Filling passwords is usually only offered for fields with a password input type, which ensures that they are always properly masked. Certain custom views (e.g., the Termux terminal view), may apply their own masking that is not based on the standard views. With this commit, we allow filling passwords into arbitrary fields as long as they have an Autofill hint that indicates a password. --- .../java/com/github/androidpasswordstore/autofillparser/FormField.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt index ae16a995..91e51f5c 100644 --- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt +++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt @@ -243,7 +243,7 @@ class FormField( // Password field heuristics (based only on the current field) private val isPossiblePasswordField = - notExcluded && (isAndroidPasswordField || isHtmlPasswordField) + notExcluded && (isAndroidPasswordField || isHtmlPasswordField || hasHintPassword) private val isCertainPasswordField = isPossiblePasswordField && hasHintPassword private val isLikelyPasswordField = isPossiblePasswordField && (isCertainPasswordField || PASSWORD_HEURISTIC_TERMS.anyMatchesFieldInfo) -- cgit v1.2.3