-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
knox: handle race condition on concurrent logout calls
With AUTO_REFRESH enabled in case of multiple logout calls when one has removed the token while the other is still authenticating we may get a DatabaseError on TokenAuthentication.renew_token while updating the expiry of a now removed auth_token. Fix that by ignoring the token that returned a database error so that in case of double logout the last request will get an AuthenticationFailed exception instead of a 500 error.
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ deps = | |
django22: Django>=2.2,<2.3 | ||
django-nose | ||
markdown<3.0 | ||
mock | ||
isort | ||
djangorestframework | ||
freezegun | ||
|