git.99rst.org
/
flatnotes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
4cca0ae
)
Fix Blank Exception
author
Adam Dullage
<redacted>
Sun, 27 Feb 2022 11:13:56 +0000
(11:13 +0000)
committer
Adam Dullage
<redacted>
Sun, 27 Feb 2022 11:13:56 +0000
(11:13 +0000)
flatnotes/auth.py
patch
|
blob
|
history
diff --git
a/flatnotes/auth.py
b/flatnotes/auth.py
index bc0135774d2ed24a694380db54c680a19b1ffc88..23cece723cd3ba0cd085048e19349f380ec5ab58 100644
(file)
--- a/
flatnotes/auth.py
+++ b/
flatnotes/auth.py
@@
-32,7
+32,7
@@
async def validate_token(token: str = Depends(oauth2_scheme)):
if username is None or username.lower() != FLATNOTES_USERNAME.lower():
raise ValueError
return FLATNOTES_USERNAME
- except:
+ except
(JWTError, ValueError)
:
raise HTTPException(
status_code=401,
detail="Invalid authentication credentials",
git clone https://git.99rst.org/PROJECT