[gnome-shell/gnome-3-6] ShellUserVerifier: fix fail counter
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-6] ShellUserVerifier: fix fail counter
- Date: Fri, 9 Nov 2012 00:09:24 +0000 (UTC)
commit d7adfe9bf1b2d86f695aaf9663bcc532a8ea2d5b
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Oct 29 17:40:55 2012 +0100
ShellUserVerifier: fix fail counter
If it is updated after checking, it counts the number of failures
not including the current one, so it allows one extra attempt. Instead,
by updating it before checking, we get the expected result of dropping the
curtain at the third password.
https://bugzilla.gnome.org/show_bug.cgi?id=687132
js/gdm/util.js | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/util.js b/js/gdm/util.js
index da31daa..d71e55f 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -333,12 +333,11 @@ const ShellUserVerifier = new Lang.Class({
// 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) {
- this._failCounter++;
-
this.clear();
this.begin(this._userName, new Batch.Hold());
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]