Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6097da89 authored by Jim Miller's avatar Jim Miller Committed by android-build-merger
Browse files

Merge \\"Fix vulnerability in LockSettings service\\" into nyc-mr1-dev am: 6ad9c16f

am: 623362c5

Change-Id: I7d604ab0a4c76672a765a064011574cd427aac64
parents 0a669af4 623362c5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ public class LockPatternUtils {
                return false;
            }
        } catch (RemoteException re) {
            return true;
            return false;
        }
    }

@@ -464,7 +464,7 @@ public class LockPatternUtils {
                return false;
            }
        } catch (RemoteException re) {
            return true;
            return false;
        }
    }

+7 −0
Original line number Diff line number Diff line
@@ -1243,6 +1243,10 @@ public class LockSettingsService extends ILockSettings.Stub {
    private VerifyCredentialResponse doVerifyPattern(String pattern, CredentialHash storedHash,
            boolean hasChallenge, long challenge, int userId,
            ICheckCredentialProgressCallback progressCallback) throws RemoteException {

       if (TextUtils.isEmpty(pattern)) {
           throw new IllegalArgumentException("Pattern can't be null or empty");
       }
       boolean shouldReEnrollBaseZero = storedHash != null && storedHash.isBaseZeroPattern;

       String patternToVerify;
@@ -1340,6 +1344,9 @@ public class LockSettingsService extends ILockSettings.Stub {
    private VerifyCredentialResponse doVerifyPassword(String password, CredentialHash storedHash,
            boolean hasChallenge, long challenge, int userId,
            ICheckCredentialProgressCallback progressCallback) throws RemoteException {
       if (TextUtils.isEmpty(password)) {
           throw new IllegalArgumentException("Password can't be null or empty");
       }
       return verifyCredential(userId, storedHash, password, hasChallenge, challenge,
               new CredentialUtil() {
                   @Override