Red Hat Bugzilla – Bug 888915
cookie library does not parse nor generate expires attribute correctly when locale is not english
Last modified: 2013-02-21 04:31:26 EST
This bug is created as a clone of upstream ticket: https://fedorahosted.org/freeipa/ticket/3313 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/cooke.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.
steps to reproduce: If client is not in English locale, and server is - you get error: ipa: ERROR: unable to parse cookie header 'ipa_session=f963e8e4006fdcd79e1a2a5a989b4d01; Domain=<IPA.DOMAIN>; Path=/ipa; Expires=Thu, 18 Dec 2012 13:54:33 GMT; Secure; HttpOnly': unable to parse expires datetime 'Thu, 18 Dec 2012 13:54:33'
Note: this is an additional fix for Bug 886371. A reviewed patch is on the upstream list: http://www.redhat.com/archives/freeipa-devel/2012-December/msg00183.html
Fixed upstream: master: https://fedorahosted.org/freeipa/changeset/159b681c16366261edd1597524d4697ef507dc4e ipa-3-1: https://fedorahosted.org/freeipa/changeset/8a981c06c36efedc726080583ffdeea82ef36703 ipa-3-0: https://fedorahosted.org/freeipa/changeset/bcda90f7e63cbf6f608f5104e136840d0e20b953
Created attachment 689920 [details] verified in ipa-server-3.0.0-22.el6.x86_64 client locale language set in Chinese with Server in English no error comes out ,client install successful.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0528.html