Fix issue where username checks were case sensitive
authorAdam Dullage <redacted>
Tue, 23 Aug 2022 11:23:42 +0000 (12:23 +0100)
committerAdam Dullage <redacted>
Tue, 23 Aug 2022 11:23:42 +0000 (12:23 +0100)
flatnotes/main.py

index 4ac37cfea5644737482cdf66de3e385c7e31b181..d2063d69642253b4f9c19fbce0019de77e33deb9 100644 (file)
@@ -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(
git clone https://git.99rst.org/PROJECT