#20687 closed Cleanup/optimization (fixed)
Document that the max_age argument of TimeStampSigner.unsign should be a number of seconds
Reported by: | Baptiste Mispelon | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | tomas.ehrlich@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Currently, neither the documentation [1] or the code [2] are very explicit about what kind of value max_age
is supposed to receive (a timedelta
, a datetime
, ...?).
It's only by looking at the error message that you can guess it's expecting seconds.
[1] https://docs.djangoproject.com/en/dev/topics/signing/#verifying-timestamped-values
[2] https://github.com/django/django/blob/master/django/core/signing.py#L185
Attachments (2)
Change History (9)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 11 years ago
Attachment: | ticket-20687.patch added |
---|
comment:2 by , 11 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:4 by , 11 years ago
Patch needs improvement: | unset |
---|
Updated PR https://github.com/django/django/pull/1323#commits-pushed-63810d3
Thanks for review
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I was looking for it this morning. Added documentation for signing data structures too (wasn't mentioned, it uses TimestampSigner neither).
https://github.com/django/django/pull/1323