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