summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2023-05-15 10:48:15 -0400
committerRay Strode <rstrode@redhat.com>2023-05-16 10:37:00 -0400
commitc4b758054ad63ae72ed22c81d845f9abd12c060d (patch)
tree7ccffe98cec6d919652be83568bd7b24aeec5e55
parent27617ef0a3187dc47669a889eea20f9396c7f3c5 (diff)
downloadgnome-shell-smartcard-pin-fix.tar.gz
authPrompt: Disregard smartcard status changes if VERIFICATION_IN_PROGRESSsmartcard-pin-fix
commit c8bb45b41c3a13ef161103f649aa18938e028a70 introduced a new verification state, VERIFICATION_IN_PROGRESS, to detect when the user has already interacted with the authentication prompt, so the prompt can rate limit the number of times the user can cancel authentication attempts with the escape key (without also rate limiting the number of times they can hit escape to go back to the clock without interacting with the prompt). That means there are now two states that represent the user actively undergoing verification: VERIFYING and VERIFICATION_IN_PROGRESS. It's inappropriate to reset the smartcard service if the user is actively conversing with it. We try to check for that by looking at the original verification state, VERIFYING, but we unfortunately, neglect to account for the new VERIFICATION_IN_PROGRESS state. The result is that if a user types their smartcard pin at the clock, and then inserts their smartcard, the pin will get cleared instead of used, and they have to retype it again. This commit fixes the oversight, and allows users to again pre-type their smartcard pin at the clock before inserting their smartcard.
-rw-r--r--js/gdm/authPrompt.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 3cda93a4f..ac82a591f 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -345,7 +345,8 @@ var AuthPrompt = GObject.registerClass({
// 2) Don't reset if we've already succeeded at verification and
// the user is getting logged in.
if (this._userVerifier.serviceIsDefault(GdmUtil.SMARTCARD_SERVICE_NAME) &&
- this.verificationStatus == AuthPromptStatus.VERIFYING &&
+ (this.verificationStatus === AuthPromptStatus.VERIFYING ||
+ this.verificationStatus === AuthPromptStatus.VERIFICATION_IN_PROGRESS) &&
this.smartcardDetected)
return;