Fix vulnerability in LockSettings service am: 2d71384a13 am: 485fbda04c am: 229de7088e am: cb83f6188b am: e3457fc127
am: 669a153531
Change-Id: Ia8a9962fdbf010066b6fd72ed4ccdc35548571f9
This commit is contained in:
@@ -1222,6 +1222,9 @@ public class LockSettingsService extends ILockSettings.Stub {
|
|||||||
long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
|
long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
checkPasswordReadPermission(userId);
|
checkPasswordReadPermission(userId);
|
||||||
|
if (TextUtils.isEmpty(pattern)) {
|
||||||
|
throw new IllegalArgumentException("Pattern can't be null or empty");
|
||||||
|
}
|
||||||
CredentialHash storedHash = mStorage.readPatternHash(userId);
|
CredentialHash storedHash = mStorage.readPatternHash(userId);
|
||||||
return doVerifyPattern(pattern, storedHash, hasChallenge, challenge, userId,
|
return doVerifyPattern(pattern, storedHash, hasChallenge, challenge, userId,
|
||||||
progressCallback);
|
progressCallback);
|
||||||
@@ -1323,6 +1326,9 @@ public class LockSettingsService extends ILockSettings.Stub {
|
|||||||
long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
|
long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
checkPasswordReadPermission(userId);
|
checkPasswordReadPermission(userId);
|
||||||
|
if (TextUtils.isEmpty(password)) {
|
||||||
|
throw new IllegalArgumentException("Password can't be null or empty");
|
||||||
|
}
|
||||||
CredentialHash storedHash = mStorage.readPasswordHash(userId);
|
CredentialHash storedHash = mStorage.readPasswordHash(userId);
|
||||||
return doVerifyPassword(password, storedHash, hasChallenge, challenge, userId,
|
return doVerifyPassword(password, storedHash, hasChallenge, challenge, userId,
|
||||||
progressCallback);
|
progressCallback);
|
||||||
|
|||||||
Reference in New Issue
Block a user