|
|
0999a2 |
From 6739f213965c2b6a41c21b446095f393f9d86e43 Mon Sep 17 00:00:00 2001
|
|
|
0999a2 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
0999a2 |
Date: Wed, 30 Sep 2015 12:51:24 -0400
|
|
|
0999a2 |
Subject: [PATCH 1/3] authPrompt: don't fade out auth messages if user types
|
|
|
0999a2 |
password up front
|
|
|
0999a2 |
|
|
|
0999a2 |
Right now we fade out any stale auth messages as soon as the user starts
|
|
|
0999a2 |
typing. This behavior doesn't really make sense if the user is typing up
|
|
|
0999a2 |
front, before a password is asked.
|
|
|
0999a2 |
---
|
|
|
0999a2 |
js/gdm/authPrompt.js | 2 +-
|
|
|
0999a2 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
0999a2 |
|
|
|
0999a2 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
0999a2 |
index 4844b9ee0..149e5ad4a 100644
|
|
|
0999a2 |
--- a/js/gdm/authPrompt.js
|
|
|
0999a2 |
+++ b/js/gdm/authPrompt.js
|
|
|
0999a2 |
@@ -179,7 +179,7 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
|
|
|
0999a2 |
[this._textEntry, this._passwordEntry].forEach(entry => {
|
|
|
0999a2 |
entry.clutter_text.connect('text-changed', () => {
|
|
|
0999a2 |
- if (!this._userVerifier.hasPendingMessages)
|
|
|
0999a2 |
+ if (!this._userVerifier.hasPendingMessages && this._queryingService && !this._preemptiveAnswer)
|
|
|
0999a2 |
this._fadeOutMessage();
|
|
|
0999a2 |
});
|
|
|
0999a2 |
|
|
|
0999a2 |
--
|
|
|
0999a2 |
2.31.1
|
|
|
0999a2 |
|
|
|
0999a2 |
|
|
|
0999a2 |
From 2b84c3d611120ae2f60386d5c637b84d1958398d Mon Sep 17 00:00:00 2001
|
|
|
0999a2 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
0999a2 |
Date: Wed, 30 Sep 2015 14:36:33 -0400
|
|
|
0999a2 |
Subject: [PATCH 2/3] authPrompt: don't spin unless answering question
|
|
|
0999a2 |
|
|
|
0999a2 |
---
|
|
|
0999a2 |
js/gdm/authPrompt.js | 9 +++++----
|
|
|
0999a2 |
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
0999a2 |
|
|
|
0999a2 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
0999a2 |
index 149e5ad4a..c5643d046 100644
|
|
|
0999a2 |
--- a/js/gdm/authPrompt.js
|
|
|
0999a2 |
+++ b/js/gdm/authPrompt.js
|
|
|
0999a2 |
@@ -243,13 +243,14 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
this.verificationStatus = AuthPromptStatus.VERIFICATION_IN_PROGRESS;
|
|
|
0999a2 |
this.updateSensitivity(false);
|
|
|
0999a2 |
|
|
|
0999a2 |
- if (shouldSpin)
|
|
|
0999a2 |
- this.startSpinning();
|
|
|
0999a2 |
+ if (this._queryingService) {
|
|
|
0999a2 |
+ if (shouldSpin)
|
|
|
0999a2 |
+ this.startSpinning();
|
|
|
0999a2 |
|
|
|
0999a2 |
- if (this._queryingService)
|
|
|
0999a2 |
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
|
|
0999a2 |
- else
|
|
|
0999a2 |
+ } else {
|
|
|
0999a2 |
this._preemptiveAnswer = this._entry.text;
|
|
|
0999a2 |
+ }
|
|
|
0999a2 |
|
|
|
0999a2 |
this.emit('next');
|
|
|
0999a2 |
}
|
|
|
0999a2 |
--
|
|
|
0999a2 |
2.31.1
|
|
|
0999a2 |
|
|
|
0999a2 |
|
|
|
0999a2 |
From 56360c872e01b0554b4d8b53dddba5407d4e889b Mon Sep 17 00:00:00 2001
|
|
|
0999a2 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
0999a2 |
Date: Mon, 5 Oct 2015 15:26:18 -0400
|
|
|
0999a2 |
Subject: [PATCH 3/3] authPrompt: stop accepting preemptive answer if user
|
|
|
0999a2 |
stops typing
|
|
|
0999a2 |
|
|
|
0999a2 |
We only want to allow the user to type the preemptive password in
|
|
|
0999a2 |
one smooth motion. If they start to type, and then stop typing,
|
|
|
0999a2 |
we should discard their preemptive password as expired.
|
|
|
0999a2 |
|
|
|
0999a2 |
Typing ahead the password is just a convenience for users who don't
|
|
|
0999a2 |
want to manually lift the shift before typing their passwords, after
|
|
|
0999a2 |
all.
|
|
|
0999a2 |
---
|
|
|
0999a2 |
js/gdm/authPrompt.js | 37 ++++++++++++++++++++++++++++++++++++-
|
|
|
0999a2 |
1 file changed, 36 insertions(+), 1 deletion(-)
|
|
|
0999a2 |
|
|
|
0999a2 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
0999a2 |
index c5643d046..84c608b2f 100644
|
|
|
0999a2 |
--- a/js/gdm/authPrompt.js
|
|
|
0999a2 |
+++ b/js/gdm/authPrompt.js
|
|
|
0999a2 |
@@ -1,7 +1,7 @@
|
|
|
0999a2 |
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
|
0999a2 |
/* exported AuthPrompt */
|
|
|
0999a2 |
|
|
|
0999a2 |
-const { Clutter, GLib, GObject, Pango, Shell, St } = imports.gi;
|
|
|
0999a2 |
+const { Clutter, GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
|
|
|
0999a2 |
|
|
|
0999a2 |
const Animation = imports.ui.animation;
|
|
|
0999a2 |
const Batch = imports.gdm.batch;
|
|
|
0999a2 |
@@ -63,6 +63,8 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
this._defaultButtonWellActor = null;
|
|
|
0999a2 |
this._cancelledRetries = 0;
|
|
|
0999a2 |
|
|
|
0999a2 |
+ this._idleMonitor = Meta.IdleMonitor.get_core();
|
|
|
0999a2 |
+
|
|
|
0999a2 |
let reauthenticationOnly;
|
|
|
0999a2 |
if (this._mode == AuthPromptMode.UNLOCK_ONLY)
|
|
|
0999a2 |
reauthenticationOnly = true;
|
|
|
0999a2 |
@@ -119,6 +121,11 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
}
|
|
|
0999a2 |
|
|
|
0999a2 |
_onDestroy() {
|
|
|
0999a2 |
+ if (this._preemptiveAnswerWatchId) {
|
|
|
0999a2 |
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
|
|
0999a2 |
+ this._preemptiveAnswerWatchId = 0;
|
|
|
0999a2 |
+ }
|
|
|
0999a2 |
+
|
|
|
0999a2 |
this._userVerifier.destroy();
|
|
|
0999a2 |
this._userVerifier = null;
|
|
|
0999a2 |
}
|
|
|
0999a2 |
@@ -250,6 +257,11 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
|
|
0999a2 |
} else {
|
|
|
0999a2 |
this._preemptiveAnswer = this._entry.text;
|
|
|
0999a2 |
+
|
|
|
0999a2 |
+ if (this._preemptiveAnswerWatchId) {
|
|
|
0999a2 |
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
|
|
0999a2 |
+ this._preemptiveAnswerWatchId = 0;
|
|
|
0999a2 |
+ }
|
|
|
0999a2 |
}
|
|
|
0999a2 |
|
|
|
0999a2 |
this.emit('next');
|
|
|
0999a2 |
@@ -429,6 +441,11 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
}
|
|
|
0999a2 |
|
|
|
0999a2 |
setQuestion(question) {
|
|
|
0999a2 |
+ if (this._preemptiveAnswerWatchId) {
|
|
|
0999a2 |
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
|
|
0999a2 |
+ this._preemptiveAnswerWatchId = 0;
|
|
|
0999a2 |
+ }
|
|
|
0999a2 |
+
|
|
|
0999a2 |
this._entry.hint_text = question;
|
|
|
0999a2 |
|
|
|
0999a2 |
this._entry.show();
|
|
|
0999a2 |
@@ -530,6 +547,19 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
this._updateEntry(false);
|
|
|
0999a2 |
}
|
|
|
0999a2 |
|
|
|
0999a2 |
+ _onUserStoppedTypePreemptiveAnswer() {
|
|
|
0999a2 |
+ if (!this._preemptiveAnswerWatchId ||
|
|
|
0999a2 |
+ this._preemptiveAnswer ||
|
|
|
0999a2 |
+ this._queryingService)
|
|
|
0999a2 |
+ return;
|
|
|
0999a2 |
+
|
|
|
0999a2 |
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
|
|
0999a2 |
+ this._preemptiveAnswerWatchId = 0;
|
|
|
0999a2 |
+
|
|
|
0999a2 |
+ this._entry.text = '';
|
|
|
0999a2 |
+ this.updateSensitivity(false);
|
|
|
0999a2 |
+ }
|
|
|
0999a2 |
+
|
|
|
0999a2 |
reset() {
|
|
|
0999a2 |
let oldStatus = this.verificationStatus;
|
|
|
0999a2 |
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
|
|
0999a2 |
@@ -537,6 +567,11 @@ var AuthPrompt = GObject.registerClass({
|
|
|
0999a2 |
this.cancelButton.can_focus = this._hasCancelButton;
|
|
|
0999a2 |
this._preemptiveAnswer = null;
|
|
|
0999a2 |
|
|
|
0999a2 |
+ if (this._preemptiveAnswerWatchId)
|
|
|
0999a2 |
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
|
|
0999a2 |
+ this._preemptiveAnswerWatchId = this._idleMonitor.add_idle_watch(500,
|
|
|
0999a2 |
+ this._onUserStoppedTypePreemptiveAnswer.bind(this));
|
|
|
0999a2 |
+
|
|
|
0999a2 |
if (this._userVerifier)
|
|
|
0999a2 |
this._userVerifier.cancel();
|
|
|
0999a2 |
|
|
|
0999a2 |
--
|
|
|
0999a2 |
2.31.1
|
|
|
0999a2 |
|