diff options
author | John Dennis <jdennis@redhat.com> | 2012-12-19 12:47:46 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-12-20 16:39:25 +0100 |
commit | 159b681c16366261edd1597524d4697ef507dc4e (patch) | |
tree | 0f9d0e6a8de2b6e91b8456c01aada73929d7d161 /lite-server.py | |
parent | 86e56b91257efa8d7c8a388f2a8a14d0adf367e5 (diff) | |
download | freeipa-159b681c16366261edd1597524d4697ef507dc4e.tar.gz freeipa-159b681c16366261edd1597524d4697ef507dc4e.tar.xz freeipa-159b681c16366261edd1597524d4697ef507dc4e.zip |
Cookie Expires date should be locale insensitive
The Expires attribute in a cookie is supposed to follow the RFC 822
(superseded by RFC 1123) date format. That format includes a weekday
abbreviation (e.g. Tue) which must be in English according to the
RFC's.
ipapython/cookie.py has methods to parse and format the Expires
attribute but they were based on strptime() and strftime() which
respects the locale. If a non-English locale is in effect the wrong
date string will be produced and/or it won't be able to parse the date
string.
The fix is to use the date parsing and formatting functions from
email.utils which specifically follow the RFC's and are not locale
sensitive.
This patch also updates the unit test to use email.utils as well.
The patch should be applied to the following branches:
Ticket: https://fedorahosted.org/freeipa/ticket/3313
Diffstat (limited to 'lite-server.py')
0 files changed, 0 insertions, 0 deletions