djangorestframework-simplejwt
djangorestframework-simplejwt copied to clipboard
Prevent incorrect usage of Token.for_user
Attempt to address #779
-
for_validated_user()
replaces currentfor_user()
method (no functionality change, it is just a rename) -
for_user()
now checksuser.is_active
flag thanks theapi_settings.USER_AUTHENTICATION_RULE
callable
It is still possible to call the .for_validated_user
method on every user (also disabled ones).
It is still possible to call the
.for_validated_user
method on every user (also disabled ones).
yes, because for_validated_user
is just a rename of the old for_user
method.
What has changed:
-
for_validated_user
is not documented (whereasfor_user
is mentioned in the documentation) -
for_validated_user
naming suggests that the user must be validated before using the method
We have the security issue alerting for almost 4 months now: https://github.com/advisories/GHSA-5vcc-86wm-547q
Is there anything to be done to accelerate the merge and shipping of the new version?
We have the security issue alerting for almost 4 months now: GHSA-5vcc-86wm-547q
Is there anything to be done to accelerate the merge and shipping of the new version?
+1 can we get this shipped ??
We have the security issue alerting for almost 4 months now: GHSA-5vcc-86wm-547q
Is there anything to be done to accelerate the merge and shipping of the new version?
+1
Hi @nils-van-zuijlen is there anything remaining for this to be merged?
Hi @nils-van-zuijlen is there anything remaining for this to be merged?
I do not know, I'm not a member / I don't have merge rights.
This PR probabily is not going to be merged.
Please read these comments on the original issue: https://github.com/jazzband/djangorestframework-simplejwt/issues/779#issuecomment-2088709374 and https://github.com/jazzband/djangorestframework-simplejwt/issues/779#issuecomment-2208889198
TL; DR: if you do not use JWTStatelessUserAuthentication
you are not vulnerable, the advisory was incomplete.