projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
252c238
)
Set status 400 on oauth exceptions
author
Magnus Hagander
<magnus@hagander.net>
Wed, 11 Jun 2025 18:47:16 +0000
(20:47 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Wed, 11 Jun 2025 18:47:16 +0000
(20:47 +0200)
It's not always entirely correct, but it's less wrong than 200.
pgweb/account/oauthclient.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/account/oauthclient.py
b/pgweb/account/oauthclient.py
index 8398cbe0d81d2f193276228feb96de7b626556dc..283e5621ca752056ae732fef37df2f86593b2c34 100644
(file)
--- a/
pgweb/account/oauthclient.py
+++ b/
pgweb/account/oauthclient.py
@@
-372,7
+372,7
@@
def _oauth_login_dispatch(provider, request):
try:
return getattr(m, fn)(request)
except OAuthException as e:
- return HttpResponse(e)
+ return HttpResponse(e
, status=400
)
except Exception as e:
log.error('Exception during OAuth: {}'.format(e))
return HttpResponse('An unhandled exception occurred during the authentication process')