Skip to content

Commit

Permalink
Full Fix for Open Redirect Issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Cainor committed Oct 11, 2023
1 parent c77defe commit 15b2393
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions CalendarinhoApp/authentication.py
Expand Up @@ -36,10 +36,8 @@ def loginForm(request, next=''):
login(request, user)
next_url = request.POST.get('next', '')
if (next_url and url_has_allowed_host_and_scheme(next_url, settings.ALLOWED_HOSTS)):
print("Good People")
return HttpResponseRedirect(next_url)
else:
print("fucking bad shit")
return HttpResponseRedirect(reverse('CalendarinhoApp:Dashboard'))
else:
messages.error(request, "Invalid login details given")
Expand Down

0 comments on commit 15b2393

Please sign in to comment.