about summary refs log tree commit diff
path: root/src/App.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-30T18·53+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-30T18·53+0100
commit75437b01b660700a4ba8d7c46b49d1031beb951b (patch)
tree1f9890f6652e1546bc52aef3abd5ed49a863b079 /src/App.hs
parentea31a014977c68c808f914556dfe9a04e96205eb (diff)
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?!
Diffstat (limited to 'src/App.hs')
-rw-r--r--src/App.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/App.hs b/src/App.hs
index 9a4c3ae2066f..273bb3951e65 100644
--- a/src/App.hs
+++ b/src/App.hs
@@ -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