gdm: Increase the verification failed counter once we've a failure
Decouple the verification failure count increase from _verificationFailed as there are some cases in which we may want to increase it without emitting a verification-failed signal. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>
This commit is contained in:
parent
53db4b99b8
commit
1158e98913
@ -384,6 +384,7 @@ var ShellUserVerifier = class {
|
|||||||
this._hold.release();
|
this._hold.release();
|
||||||
|
|
||||||
this._queueMessage(_("Authentication error"), MessageType.ERROR);
|
this._queueMessage(_("Authentication error"), MessageType.ERROR);
|
||||||
|
this._failCounter++;
|
||||||
this._verificationFailed(serviceName, false);
|
this._verificationFailed(serviceName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,7 +610,6 @@ var ShellUserVerifier = class {
|
|||||||
// Otherwise, when in login mode we allow ALLOWED_FAILURES attempts.
|
// Otherwise, when in login mode we allow ALLOWED_FAILURES attempts.
|
||||||
// After that, we go back to the welcome screen.
|
// After that, we go back to the welcome screen.
|
||||||
|
|
||||||
this._failCounter++;
|
|
||||||
let canRetry = retry && this._userName &&
|
let canRetry = retry && this._userName &&
|
||||||
(this._reauthOnly ||
|
(this._reauthOnly ||
|
||||||
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY));
|
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY));
|
||||||
@ -660,8 +660,10 @@ var ShellUserVerifier = class {
|
|||||||
// if the password service fails, then cancel everything.
|
// if the password service fails, then cancel everything.
|
||||||
// But if, e.g., fingerprint fails, still give
|
// But if, e.g., fingerprint fails, still give
|
||||||
// password authentication a chance to succeed
|
// password authentication a chance to succeed
|
||||||
if (this.serviceIsForeground(serviceName))
|
if (this.serviceIsForeground(serviceName)) {
|
||||||
|
this._failCounter++;
|
||||||
this._verificationFailed(serviceName, true);
|
this._verificationFailed(serviceName, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Signals.addSignalMethods(ShellUserVerifier.prototype);
|
Signals.addSignalMethods(ShellUserVerifier.prototype);
|
||||||
|
Loading…
Reference in New Issue
Block a user