Opened 7 years ago
Last modified 5 years ago
#28690 closed Bug
django.utils.http.parse_http_date two digit year check is incorrect — at Initial Version
Reported by: | Mads Jensen | Owned by: | nobody |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Ad Timmering | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
RFC 850 does not mention this, but in RFC 7231 (and there's something similar in RFC 2822), there's the following quote:
Recipients of a timestamp value in rfc850-date format, which uses a
two-digit year, MUST interpret a timestamp that appears to be more
than 50 years in the future as representing the most recent year in
the past that had the same last two digits.
The < 70
is incorrect, and should have been < 50
. I inserted a diff that applies.
Note:
See TracTickets
for help on using tickets.