Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#27815 closed Bug (fixed)

contrib.auth.views.LoginView doesn't pass request object to AuthenticationForm

Reported by: zgyarmati Owned by: zgyarmati
Component: contrib.auth Version: 1.11
Severity: Release blocker Keywords: request, LoginView, authenticate
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The request object isn't passed to the LoginView's form_class 'AuthenticationForm' and hence it's not passed to the auth backend's authenticate() method, because LoginView lacks the get_form_kwargs() method override.

Change History (6)

comment:1 Changed 3 years ago by Claude Paroz

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 Changed 3 years ago by zgyarmati

Has patch: set

comment:3 Changed 3 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 41ba27fe:

Fixed #27815 -- Made LoginView pass the request kwarg to AuthenticationForm.

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

In f94e1a5d:

[1.11.x] Fixed #27815 -- Made LoginView pass the request kwarg to AuthenticationForm.

Backport of 41ba27fefdd313333d94408802afff36a9eedb83 from master

comment:6 Changed 3 years ago by Tim Graham <timograham@…>

In 854f695:

Refs #27815 -- Reordered LoginView.get_form_kwargs().

Note: See TracTickets for help on using tickets.
Back to Top