diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py index 5de3989ffc..60e6611b98 100644 --- a/django/contrib/auth/views.py +++ b/django/contrib/auth/views.py @@ -74,7 +74,7 @@ class LoginView(SuccessURLAllowedHostsMixin, FormView): def get_redirect_url(self): """Return the user-originating redirect URL if it's safe.""" redirect_to = self.request.POST.get( - self.redirect_field_name, self.request.GET.get(self.redirect_field_name, "") + self.redirect_field_name, self.request.GET.get(self.redirect_field_name) ) url_is_safe = url_has_allowed_host_and_scheme( url=redirect_to,