Opened 8 years ago

Closed 8 years ago

#26343 closed Bug (fixed)

user_login_failed not fired on PermissionDenied

Reported by: Marten Kenbeek Owned by: Sam
Component: contrib.auth Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

If an authentication backend raises PermissionDenied, the authenticate() function will short-circuit, and fail to fire the user_login_failed signal.

See https://github.com/django/django/blob/34c56687ae4df2cff632447eddd7ef255ee74726/django/contrib/auth/__init__.py#L75

Change History (6)

comment:1 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Sam, 8 years ago

Owner: changed from nobody to Sam
Status: newassigned

comment:3 by Sam, 8 years ago

Work is available at https://github.com/django/django/pull/6280. Docs build fine and tests pass under Postgresql. First time contributing so please let me know if I am missing anything!

Last edited 8 years ago by Tim Graham (previous) (diff)

comment:4 by Tim Graham, 8 years ago

Has patch: set
Needs tests: set

When adding a link to the pull request, please check "Has patch". Please uncheck "Needs tests" when you update your pull request with one.

comment:5 by Sam, 8 years ago

Needs tests: unset

Regression test added!

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

Resolution: fixed
Status: assignedclosed

In ab8af342:

Fixed #26343 -- Sent user_login_failed signal if an auth backend raises PermissionDenied.

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