Skip to content
Snippets Groups Projects
Commit 97ac2845 authored by Eric Fischer's avatar Eric Fischer
Browse files

Fix for LoginFailure.MultipleObjectsReturned in is_user_locked_out (replay)

The get_or_create function is vulnerable to race conditions in MySQL, which can
cause the model LoginFailure to, in some cases, have more than one row for the
same user, breaking the login for that user.

Addinf functionality to expect and clean the error by deleting extra rows (by
oldest lockout date), leaving just one entry and allowing the user to login.

Replayed and squashed by @efischer19, initially commited by @laq
parent c518543c
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment