[Django] #30797: LoginView Error when going back to login page

8 views
Skip to first unread message

Django

unread,
Sep 23, 2019, 10:41:09 PM9/23/19
to django-...@googlegroups.com
#30797: LoginView Error when going back to login page
-----------------------------------------+------------------------
Reporter: Jodel Asur | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I'm having an issue with LoginView when we go back to the login page using
the browser back button. I've deployed a simple web app
(https://jodelasur.pythonanywhere.com) so you can test for yourself.

Steps to recreate:

1. Enter invalid (random) credentials and submit. You should see the "Your
username didn't match" error.
2. Enter valid credentials (user: user, password: userpassworduser). You
should be logged-in successfully and redirected to home page.
3. Press the back button.

Actual output: Browser error (Chrome: Confirm Form Resubmission, Firefox:
Document Expired).
Expected output: Still redirect to home page, since l'm already
authenticated.

If I don't enter invalid credentials as the first step (i.e. just do steps
2 and 3), no error page appears, and I get the expected output of being
redirected to the home page even after pressing the back button.

Here's the repo url if you need to see the code:
https://github.com/jodelasur/login_view_test.

I already asked in django-users (https://groups.google.com/forum/#!topic
/django-users/jmYawBY-TmM) but no one was answering. I feel that this is a
bug, so I figured I report it now.

--
Ticket URL: <https://code.djangoproject.com/ticket/30797>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 24, 2019, 2:40:57 AM9/24/19
to django-...@googlegroups.com
#30797: LoginView Error when going back to login page
------------------------------+--------------------------------------

Reporter: Jodel Asur | Owner: nobody
Type: Bug | Status: closed
Component: contrib.auth | Version: 2.2
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by felixxm):

* status: new => closed
* component: Uncategorized => contrib.auth
* resolution: => invalid


Comment:

Thanks for this report, however this is not an issue in Django it is
browsers behavior. Please don't use the ticket system
[https://docs.djangoproject.com/en/stable/faq/help/ for help with support
questions]. I would recommend to ask on #django IRC channel if you didn't
get any help on a mailing list.

--
Ticket URL: <https://code.djangoproject.com/ticket/30797#comment:1>

Reply all
Reply to author
Forward
0 new messages