Allow empty 'next' link when asking for community auth consent
authorMagnus Hagander <magnus@hagander.net>
Tue, 14 Aug 2018 11:37:23 +0000 (13:37 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 14 Aug 2018 11:37:23 +0000 (13:37 +0200)
Per crashdump

pgweb/account/views.py

index 0ee8b3941688c36dad0b88a1adc3cfc6feb5320e..a524a123cc4f4044e4293c9dd8f25de5e45185fb 100644 (file)
@@ -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,