From cf6f7eb276edd4ae9b497e54167ea10f7d804f21 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 7 Jun 2017 15:00:11 -0400 Subject: [PATCH] gdmUtil: Fix auth prompt drawing over user list If the user fails to enter their password then hits escape, we jump back to the user list, then ask again for a password in a garbled screen. this commit fixes that by skipping a retry if the operation is cancelled. --- js/gdm/util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/gdm/util.js b/js/gdm/util.js index 6876cbef9..03fd344ef 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -513,61 +513,62 @@ const ShellUserVerifier = new Lang.Class({ _onVerificationComplete: function() { this.emit('verification-complete'); }, _cancelAndReset: function() { this.cancel(); this._onReset(); }, _retry: function() { this.begin(this._userName, new Batch.Hold()); }, _verificationFailed: function(retry) { // For Not Listed / enterprise logins, immediately reset // the dialog // Otherwise, we allow ALLOWED_FAILURES attempts. After that, we // go back to the welcome screen. this._failCounter++; let canRetry = retry && this._userName && this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY); if (canRetry) { if (!this.hasPendingMessages) { this._retry(); } else { let signalId = this.connect('no-more-messages', Lang.bind(this, function() { this.disconnect(signalId); - this._retry(); + if (this._cancellable && !this._cancellable.is_cancelled()) + this._retry(); })); } } else { if (!this.hasPendingMessages) { this._cancelAndReset(); } else { let signalId = this.connect('no-more-messages', Lang.bind(this, function() { this.disconnect(signalId); this._cancelAndReset(); })); } } this.emit('verification-failed'); }, _onConversationStopped: function(client, serviceName) { // If the login failed with the preauthenticated oVirt credentials // then discard the credentials and revert to default authentication // mechanism. if (this.serviceIsForeground(OVIRT_SERVICE_NAME)) { this._oVirtCredentialsManager.resetToken(); this._preemptingService = null; this._verificationFailed(false); return; } // if the password service fails, then cancel everything. // But if, e.g., fingerprint fails, still give -- 2.13.0