Properly validate credential in setLock(int, byte[], int, byte[])
In KeyguardManager, one of the two overloads of setLock() properly validates the new credential using the logic in PasswordMetrics, while the other doesn't. This appears to be an oversight, and it was allowing a test to set a PIN containing invalid characters. Fix this by always calling PasswordMetrics#validateCredential() on the new credential. Bug: 219511761 Bug: 232900169 Bug: 243881358 Test: atest android.app.KeyguardManagerTest Test: atest android.app.cts.KeyguardManagerTest Test: atest CtsSensorPrivacyTestCases # since it calls setLock() Change-Id: I46d8bf920526a00d6e6d2145d06c8e39f8047ea8
Loading
Please register or sign in to comment