Check password blacklist when setting credential

If the password is valid by all other checks, see if it is present on
the blacklist and disallow it if it is.

Test: set a password blacklist, try and set a blacklisted password and
see an explanation, set a non-blacklisted password successfully.
Test: make ROBOTEST_FILTER=ChooseLockPasswordTest RunSettingsRoboTests

Bug: 63578054
Fix: 65659151
Change-Id: Id155b824ad4b5839c23b6f5fd3fdfdcfc78c3df1
This commit is contained in:
Alexandru-Andrei Rotaru
2017-08-07 12:21:31 +01:00
committed by Andrew Scull
parent 3a2573b812
commit aeb3e4473b
4 changed files with 83 additions and 24 deletions

View File

@@ -1336,6 +1336,9 @@
<!-- Error shown when in PIN mode and PIN has been used recently. Please keep this string short! -->
<string name="lockpassword_pin_recently_used">Device admin doesn\'t allow using a recent PIN</string>
<!-- Error shown when a user is choosing a PIN for their work phone, but what they suggest is blocked by their company's IT administrator. The user should try another PIN that's less common and more complicated. -->
<string name="lockpassword_pin_blacklisted_by_admin">Common PINs are blocked by your IT admin. Try a different PIN.</string>
<!-- Error shown when in PASSWORD mode and user enters an invalid character -->
<string name="lockpassword_illegal_character">This can\'t include an invalid character</string>
@@ -1388,6 +1391,9 @@
<string name="lockpassword_password_recently_used">Device admin doesn\'t allow using a recent
password</string>
<!-- Error shown when a user is choosing a PASSWORD for their work phone, but what they suggest is blocked by their company's IT administrator. The user should try another PASSWORD that's less common and more complicated. -->
<string name="lockpassword_password_blacklisted_by_admin">Common passwords are blocked by your IT admin. Try a different password.</string>
<!-- [CHAR_LIMIT=NONE] Error shown when the user tries to set an ascending or descending sequence of digits -->
<string name="lockpassword_pin_no_sequential_digits">Ascending, descending, or repeated sequence
of digits isn\'t allowed</string>