mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-1176: Clear passwords if credentials are rejected for any reason (even client error). Flag generic login error only for specifically invalid credentials.
This commit is contained in:
@@ -123,9 +123,12 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
|
||||
// Reset upon failure
|
||||
['catch'](function loginFailed(error) {
|
||||
|
||||
// Clear out passwords and flag error if credentials are invalid
|
||||
if (error.type === Error.Type.INVALID_CREDENTIALS) {
|
||||
// Flag generic error for invalid login
|
||||
if (error.type === Error.Type.INVALID_CREDENTIALS)
|
||||
$scope.loginError = true;
|
||||
|
||||
// Clear out passwords if the credentials were rejected for any reason
|
||||
if (error.type !== Error.Type.INSUFFICIENT_CREDENTIALS) {
|
||||
angular.forEach($scope.form, function clearEnteredValueIfPassword(field) {
|
||||
|
||||
// Remove entered value only if field is a password field
|
||||
|
Reference in New Issue
Block a user