Skip to content

Commit

Permalink
fix(account): Don't check redirect url if there's no redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Akay7 committed Feb 7, 2024
1 parent 93d47fd commit c3b0af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion allauth/account/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_next_redirect_url(request, redirect_field_name="next"):
via the request.
"""
redirect_to = get_request_param(request, redirect_field_name)
if not get_adapter().is_safe_url(redirect_to):
if redirect_to and not get_adapter().is_safe_url(redirect_to):
redirect_to = None
return redirect_to

Expand Down

0 comments on commit c3b0af2

Please sign in to comment.