TimestampSigner should use a more precise timestamp
|Reported by:||floguy||Owned by:||floguy|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Generating a secure cookie using the TimestampSigner within the same second and the same data actually generates precisely the same cookie.
I'm currently developing a cookie-based session backend, and this line keeps failing as a result, because cycling the cookie isn't really cycling the cookie: https://code.djangoproject.com/browser/django/trunk/django/contrib/sessions/tests.py#L153
I've attached a small patch that fixes the problem by increasing the precision.
Change History (13)
comment:6 Changed 5 years ago by
|Patch needs improvement:||unset|
|Status:||closed → reopened|
|Triage Stage:||Ready for checkin → Design decision needed|
comment:7 Changed 5 years ago by
|Triage Stage:||Design decision needed → Accepted|