Skip to content

Commit 88eff03

Browse files
BREAKING: return 401 AuthenticationFailed instead of 404 DoesNotExist for missing users
1 parent 8246ae5 commit 88eff03

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [Unreleased]
2+
3+
### Changed
4+
- **BREAKING:** In `serializers.py`, when a user linked to a token is missing or deleted, the code now raises `AuthenticationFailed("no_active_account")` instead of allowing `DoesNotExist` to propagate.
5+
- Response changed from **404 Not Found****401 Unauthorized**.
6+
- Improves security by not leaking whether a user/token exists.
7+
- Follows RFC 7235, where authentication failures should return 401.
8+
- Clearer for clients: signals an auth issue instead of suggesting the endpoint is missing.
9+
10+
111
## 5.5.1
212

313
Missing Migration for rest_framework_simplejwt.token_blacklist app. A previously missing migration (0013_blacklist) has now been added. This issue arose because the migration file was mistakenly not generated earlier. This migration was never part of an official release, but users following the latest master branch may have encountered it.

0 commit comments

Comments
 (0)