Fixed wrong field value.

fix #1180
This commit is contained in:
Antoine Nguyen
2017-07-16 20:12:43 +02:00
parent 28e86b8598
commit 09f0fd6122
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -57,11 +57,11 @@ def dologin(request):
"user": form.cleaned_data["username"]}
)
nextlocation = request.POST.get("next", None)
nextlocation = request.POST.get("next", "")
httpcode = 401
else:
form = forms.LoginForm()
nextlocation = request.GET.get("next", None)
nextlocation = request.GET.get("next", "")
httpcode = 200
announcements = signals.get_announcements.send(
@@ -75,6 +75,7 @@ def dologin(request):
request),
status=httpcode)
dologin = never_cache(dologin)
+1 -1
View File
@@ -18,7 +18,7 @@ def find_nextlocation(request, user):
return reverse("core:user_index")
nextlocation = request.POST.get("next", request.GET.get("next"))
condition = (
nextlocation is not None and nextlocation != "" and nextlocation != "None" and
nextlocation and
is_safe_url(nextlocation, host=request.get_host())
)
if condition: