LockContext: prevent multiple auth attempts at the same time

This commit is contained in:
Ly-sec
2025-12-13 13:32:26 +01:00
parent 1a2353ecb0
commit 1a605db842
+6 -5
View File
@@ -30,6 +30,11 @@ Scope {
return;
}
if (root.unlockInProgress) {
Logger.i("LockContext", "Unlock already in progress, ignoring duplicate attempt");
return;
}
root.unlockInProgress = true;
errorMessage = "";
showFailure = false;
@@ -52,7 +57,7 @@ Scope {
infoMessage = message;
}
if (responseRequired) {
if (responseRequired && root.unlockInProgress) {
Logger.i("LockContext", "Responding to PAM with password");
respond(root.currentText);
}
@@ -60,10 +65,6 @@ Scope {
onResponseRequiredChanged: {
Logger.i("LockContext", "Response required changed:", responseRequired);
if (responseRequired && root.unlockInProgress) {
Logger.i("LockContext", "Automatically responding to PAM");
respond(root.currentText);
}
}
onCompleted: result => {