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

Commit cca9cb7a authored by Brahmaji K's avatar Brahmaji K Committed by Steve Kondik
Browse files

keyguard: Fix password doesnot sanitize after verification

Add sanitizePassword call after the verification is success so
that the password/pin/pattern goes to default_password. This
will avoid security vulnerability.

Change-Id: I711b9e38e1812bad9fa7ab8d0ab9e35963138a69
parent 931814de
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -147,6 +147,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout


    private void onPasswordChecked(boolean matched, int timeoutMs, boolean isValidPassword) {
    private void onPasswordChecked(boolean matched, int timeoutMs, boolean isValidPassword) {
        if (matched) {
        if (matched) {
            mLockPatternUtils.sanitizePassword();
            mDismissing = true;
            mDismissing = true;
            mCallback.reportUnlockAttempt(true, 0);
            mCallback.reportUnlockAttempt(true, 0);
            mCallback.dismiss(true);
            mCallback.dismiss(true);
+1 −0
Original line number Original line Diff line number Diff line
@@ -262,6 +262,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit


        private void onPatternChecked(boolean matched, int timeoutMs, boolean isValidPattern) {
        private void onPatternChecked(boolean matched, int timeoutMs, boolean isValidPattern) {
            if (matched) {
            if (matched) {
                mLockPatternUtils.sanitizePassword();
                mCallback.reportUnlockAttempt(true, 0);
                mCallback.reportUnlockAttempt(true, 0);
                mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Correct);
                mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Correct);
                mCallback.dismiss(true);
                mCallback.dismiss(true);