Skip to content

Commit

Permalink
[nemo-qml-plugin-devicelock] Handle SecurityCodeExpired while Unlocki…
Browse files Browse the repository at this point in the history
…ng. Contributes to JB#53701
  • Loading branch information
Evgeny Eremin committed Mar 26, 2021
1 parent 3569d10 commit 7d63985
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/nemo-devicelock/host/hostdevicelock.cpp
Expand Up @@ -160,6 +160,12 @@ void HostDeviceLock::enterSecurityCode(const QString &code)
case LockedOut:
lockedOut();
break;
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.