From: Adam Dullage Date: Tue, 23 Aug 2022 11:23:42 +0000 (+0100) Subject: Fix issue where username checks were case sensitive X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=3312aecc44911fc62fcab6bf7ff59e09c26b50b6;p=flatnotes.git Fix issue where username checks were case sensitive --- diff --git a/flatnotes/main.py b/flatnotes/main.py index 4ac37cf..d2063d6 100644 --- a/flatnotes/main.py +++ b/flatnotes/main.py @@ -34,7 +34,7 @@ flatnotes = Flatnotes(os.environ["FLATNOTES_PATH"]) @app.post("/api/token") async def token(data: LoginModel): if ( - data.username != FLATNOTES_USERNAME + data.username.lower() != FLATNOTES_USERNAME.lower() or data.password != FLATNOTES_PASSWORD ): raise HTTPException(