diff options
-rw-r--r-- | api/user.go | 7 | ||||
-rw-r--r-- | config/config.json | 2 | ||||
-rw-r--r-- | config/config_docker.json | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/api/user.go b/api/user.go index 94b4eca18..3c9ae5718 100644 --- a/api/user.go +++ b/api/user.go @@ -300,9 +300,14 @@ func checkUserPassword(c *Context, user *model.User, password string) bool { } return false + } else { + if result := <-Srv.Store.User().UpdateFailedPasswordAttempts(user.Id, 0); result.Err != nil { + c.LogError(result.Err) + } + + return true } - return true } // User MUST be validated before calling Login diff --git a/config/config.json b/config/config.json index 40bb41e63..121d5b3a4 100644 --- a/config/config.json +++ b/config/config.json @@ -22,7 +22,7 @@ "AnalyticsUrl": "", "UseLocalStorage": true, "StorageDirectory": "./data/", - "AllowedLoginAttempts": 3 + "AllowedLoginAttempts": 10 }, "SSOSettings": { "gitlab": { diff --git a/config/config_docker.json b/config/config_docker.json index e4f37976d..712551d1f 100644 --- a/config/config_docker.json +++ b/config/config_docker.json @@ -22,7 +22,7 @@ "AnalyticsUrl": "", "UseLocalStorage": true, "StorageDirectory": "/mattermost/data/", - "AllowedLoginAttempts": 3 + "AllowedLoginAttempts": 10 }, "SSOSettings": { "gitlab": { |