Check for GTE instead of GT
Somebody incremenet the total number of off-by-one errors that I've made in my career. I think the current count is 99... or is it 100? 101? Who knows?!
This commit is contained in:
parent
ea31a01497
commit
75437b01b6
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ server T.Config{..} = createAccount
|
|||
liftIO $ LoginAttempts.increment dbFile username
|
||||
throwError err401 { errBody = "Your credentials are invalid" }
|
||||
Just attempts ->
|
||||
if attempts > 3 then
|
||||
if attempts >= 3 then
|
||||
throwError err429
|
||||
else if T.passwordsMatch password accountPassword then do
|
||||
uuid <- liftIO $ Sessions.findOrCreate dbFile account
|
||||
|
|
Loading…
Reference in a new issue