diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-30 00:46:17 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-30 00:46:17 -0800 |
commit | b4877c5d36569dae486a1e53f39c35d346e3d3d2 (patch) | |
tree | c531aaff8514ce3cb7508d67a33d89a4d116d5d5 | |
parent | 4244990bf118c04d4d66dd946aaf5217fc59a393 (diff) | |
download | chat-b4877c5d36569dae486a1e53f39c35d346e3d3d2.tar.gz chat-b4877c5d36569dae486a1e53f39c35d346e3d3d2.tar.bz2 chat-b4877c5d36569dae486a1e53f39c35d346e3d3d2.zip |
Fixing code review feedback
-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": { |