Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[nemo-qml-plugin-devicelock] Handle SecurityCodeExpired while Unlocki…
…ng. Contributes to JB#53701
  • Loading branch information
Evgeny Eremin committed Mar 26, 2021
1 parent 3569d10 commit 7d63985
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/nemo-devicelock/host/hostdevicelock.cpp
Expand Up @@ -160,7 +160,13 @@ void HostDeviceLock::enterSecurityCode(const QString &code)
case LockedOut:
lockedOut();
break;
default:
case Evaluating:
// Set currentCode to use it as oldCode in case evaluation
// reveals it is expired and must be changed with a newCode
m_currentCode = code;
unlockFinished(result, Authenticator::SecurityCode);
break;
default:
unlockFinished(result, Authenticator::SecurityCode);
break;
}
Expand Down Expand Up @@ -241,6 +247,9 @@ void HostDeviceLock::unlockFinished(int result, Authenticator::Method method)
}
break;
case SecurityCodeExpired:
enterCodeChangeState(&HostAuthenticationInput::feedback);
authenticationResumed(AuthenticationInput::SecurityCodeExpired, QVariantMap(), Authenticator::SecurityCode);
break;
case SecurityCodeInHistory:
case LockedOut:
if (m_state == Canceled) {
Expand Down

0 comments on commit 7d63985

Please sign in to comment.