From 7f3581c62e3b0fd367a8ab6dfb1cd39340de169a Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 14 Aug 2018 13:37:23 +0200 Subject: [PATCH] Allow empty 'next' link when asking for community auth consent Per crashdump --- pgweb/account/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgweb/account/views.py b/pgweb/account/views.py index 0ee8b394..a524a123 100644 --- a/pgweb/account/views.py +++ b/pgweb/account/views.py @@ -549,7 +549,7 @@ def communityauth_consent(request, siteid): ) return HttpResponseRedirect(form.cleaned_data['next']) else: - form = CommunityAuthConsentForm(org.orgname, initial={'next': request.GET['next']}) + form = CommunityAuthConsentForm(org.orgname, initial={'next': request.GET.get('next', '')}) return render_pgweb(request, 'account', 'base/form.html', { 'form': form,