From b4877c5d36569dae486a1e53f39c35d346e3d3d2 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 30 Jul 2015 00:46:17 -0800 Subject: [PATCH] Fixing code review feedback --- api/user.go | 7 ++++++- config/config.json | 2 +- config/config_docker.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api/user.go b/api/user.go index 94b4eca18d..3c9ae57180 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 40bb41e63e..121d5b3a4a 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 e4f37976de..712551d1fd 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": {