From 75437b01b660700a4ba8d7c46b49d1031beb951b Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 30 Jul 2020 19:53:46 +0100 Subject: 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?! --- src/App.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit 1.4.1