Opened 8 years ago

Closed 8 years ago

Last modified 8 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 by Claude Paroz, 8 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 by zgyarmati, 8 years ago

Has patch: set

comment:3 by Tim Graham, 8 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 41ba27fe:

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

comment:5 by Tim Graham <timograham@…>, 8 years ago

In f94e1a5d:

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

Backport of 41ba27fefdd313333d94408802afff36a9eedb83 from master

comment:6 by Tim Graham <timograham@…>, 8 years ago

In 854f695:

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

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