#36195: redirect_to_login Misinterprets next Parameter with Multiple Query
Parameters
-------------------------------------+-------------------------------------
     Reporter:  Antoni Czaplicki     |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.auth         |                  Version:  5.1
     Severity:  Normal               |               Resolution:
                                     |  worksforme
     Keywords:  auth                 |             Triage Stage:
  redirect_to_login query            |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

 * resolution:   => worksforme
 * status:  new => closed

Comment:

 Checked via a test and a test project, the parameters are escaped for me

 {{{#!diff
 --- a/tests/test_client/tests.py
 +++ b/tests/test_client/tests.py
 @@ -557,6 +557,10 @@ class ClientTest(TestCase):
          self.assertEqual(response.status_code, 200)
          self.assertEqual(response.context["user"].username, "testclient")

 +    def test_view_with_login_with_query_parameter(self):
 +        response = self.client.get("/login_protected_view/?foo=1&bar=2")
 +        self.assertRedirects(response,
 "/accounts/login/?next=/login_protected_view/%3Ffoo%3D1%26bar%3D2")
 +
      @override_settings(
          INSTALLED_APPS=["django.contrib.auth"],
          SESSION_ENGINE="django.contrib.sessions.backends.file",
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36195#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019512eb1167-f03d3c88-12c5-424c-9f2c-d1a63613b71e-000000%40eu-central-1.amazonses.com.

Reply via email to