Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'omp-jb53701' into 'master'
[nemo-qml-plugin-devicelock] Handle SecurityCodeExpired while Unlocking. Contributes to JB#53701

See merge request mer-core/nemo-qml-plugin-devicelock!58
  • Loading branch information
pvuorela committed May 27, 2021
2 parents 3569d10 + 7d63985 commit f10be30
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 f10be30

Please sign in to comment.