aboutsummaryrefslogtreecommitdiff
path: root/autofill-parser
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-10-02 12:19:20 +0200
committerGitHub <noreply@github.com>2020-10-02 15:49:20 +0530
commiteac1c6f1d87730fddd933d9a39b1e73226728bdf (patch)
tree30e8806fc0fbf90ac4261da5b4414c938037b981 /autofill-parser
parent8f3fd99472b478ae9c50482627bfac49c67676be (diff)
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.
Diffstat (limited to 'autofill-parser')
-rw-r--r--autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FormField.kt2
1 files changed, 1 insertions, 1 deletions
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)