summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Eric Biggers <ebiggers@google.com> 2023-06-27 22:27:26 +0000
committer Eric Biggers <ebiggers@google.com> 2023-10-06 17:03:21 +0000
commit6d5531ffc993064ca39cdf9b208098d3ab7418de (patch)
treebb7b904df511839b283ba3ddfc950938b6b7f76a /libs/androidfw/FileStream.cpp
parent27a062bcc2d4f5b7a5981ff0be346072ef9812e1 (diff)
Enforce minimum pattern length in PasswordMetrics
For patterns, currently PasswordMetrics#validateCredential() does nothing except validate that the pattern credential type is allowed. Pattern length is supposed to be >= MIN_LOCK_PATTERN_SIZE, but that is hardcoded into the ChooseLockPattern activity in Settings. Since there are other places that can set a pattern lockscreen credential, such as LockSettingsShellCommand, let's add the pattern length validation to PasswordMetrics#validatePasswordMetrics() so that it gets done in the same place as PIN and password validation. Note that this required starting to populate the length field of PasswordMetrics created for patterns. Bug: 219511761 Bug: 232900169 Bug: 243881358 Test: atest PasswordMetricsTest Change-Id: I9f33f86045ea5f674b8ab79f9fda62c988436c53 Merged-In: I9f33f86045ea5f674b8ab79f9fda62c988436c53 (cherry picked from commit e4c9d2de89f206cf1586c30d551a61aa43f6cb37)
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions