We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7959b22 commit 4bc540bCopy full SHA for 4bc540b
pgweb/account/views.py
@@ -45,6 +45,7 @@
45
from .forms import UserForm, UserProfileForm, ContributorForm
46
from .forms import AddEmailForm, PgwebPasswordResetForm
47
from .oauthclient import get_encrypted_oauth_cookie, delete_encrypted_oauth_cookie_on
48
+from .oauthclient import OAuthException
49
50
import logging
51
@@ -542,7 +543,10 @@ def signup_complete(request):
542
543
@transaction.atomic
544
@queryparams('do_abort')
545
def signup_oauth(request):
- cookiedata = get_encrypted_oauth_cookie(request)
546
+ try:
547
+ cookiedata = get_encrypted_oauth_cookie(request)
548
+ except OAuthException as e:
549
+ return HttpResponse(e, status=400)
550
551
if 'oauth_email' not in cookiedata \
552
or 'oauth_firstname' not in cookiedata \
0 commit comments