freeipa/ipapython
John Dennis 159b681c16 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
2012-12-20 16:39:25 +01:00
..
platform Stop and disable conflicting time&date services 2012-12-07 13:07:36 -05:00
py_default_encoding Check for Python.h during build of py_default_encoding extension 2011-11-16 18:34:16 -05:00
test Fix failed tests. API for utcoffset changed and strings are more robust. 2011-01-24 14:34:38 -05:00
__init__.py Rename ipa-python directory to ipapython so it is a real python library 2009-02-09 14:35:15 -05:00
admintool.py Ticket #2850 - Ipactl exception not handled well 2012-08-27 15:30:28 +02:00
certdb.py Move the compat module from ipalib to ipapython. 2012-02-13 22:22:49 -05:00
certmonger.py Use correct Dogtag configuration in get_pin and get_ca_certchain 2012-11-23 12:19:19 +01:00
compat.py Move the compat module from ipalib to ipapython. 2012-02-13 22:22:49 -05:00
config.py Fix winsync agreements creation 2012-08-12 23:26:16 -04:00
cookie.py Cookie Expires date should be locale insensitive 2012-12-20 16:39:25 +01:00
dn.py Ticket #3008: DN objects hash differently depending on case 2012-08-22 17:23:12 +03:00
dogtag.py Use correct Dogtag configuration in get_pin and get_ca_certchain 2012-11-23 12:19:19 +01:00
entity.py Use DN objects instead of strings 2012-08-12 16:23:24 -04:00
ipa_log_manager.py Use DN objects instead of strings 2012-08-12 16:23:24 -04:00
ipa.conf Rename ipa-python directory to ipapython so it is a real python library 2009-02-09 14:35:15 -05:00
ipautil.py Switch %r specifiers to '%s' in Public errors 2012-12-11 10:52:06 +01:00
ipavalidate.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
kernel_keyring.py Store session cookie in ccache for cli users 2012-06-14 14:02:26 +02:00
log_manager.py Fix various typos. 2012-09-18 08:45:28 +02:00
Makefile Introduce platform-specific adaptation for services used by FreeIPA. 2011-09-13 11:25:58 +02:00
MANIFEST.in Rename ipa-python directory to ipapython so it is a real python library 2009-02-09 14:35:15 -05:00
nsslib.py Close connection after each request, avoid NSS shutdown problem. 2012-10-24 15:07:53 -04:00
README Replace DNS client based on acutil with python-dns 2012-05-24 13:55:56 +02:00
services.py.in Save service name on service startup/shutdown 2012-11-01 14:24:41 -04:00
setup.py.in Introduce platform-specific adaptation for services used by FreeIPA. 2011-09-13 11:25:58 +02:00
ssh.py SSHPublicKey.fingerprint_dns_sha1 should return unicode value. 2012-09-20 10:44:28 +02:00
sysrestore.py Improves sssd.conf handling during ipa-client uninstall 2012-09-20 16:57:13 +02:00
version.py.in Add API version and have server reject incompatible clients. 2011-01-14 14:26:22 -05:00

This is a set of libraries common to IPA clients and servers though mostly
geared currently towards command-line tools.

A brief overview:

config.py - identify the IPA server domain and realm. It uses python-dns to
            try to detect this information first and will fall back to
            /etc/ipa/default.conf if that fails.

ipautil.py - helper functions

entity.py - entity is the main data type. User and Group extend this class
            (but don't add anything currently).

ipavalidate.py - basic data validation routines