Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 888915 - cookie library does not parse nor generate expires attribute correctly when locale is not english
cookie library does not parse nor generate expires attribute correctly when l...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.4
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
Namita Soman
:
Depends On:
Blocks: 895654
  Show dependency treegraph
 
Reported: 2012-12-19 13:49 EST by Dmitri Pal
Modified: 2013-02-21 04:31 EST (History)
2 users (show)

See Also:
Fixed In Version: ipa-3.0.0-18.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 04:31:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
verified in ipa-server-3.0.0-22.el6.x86_64 (486.34 KB, image/png)
2013-01-29 11:05 EST, Xiyang Dong
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 03:22:21 EST

  None (edit)
Description Dmitri Pal 2012-12-19 13:49:08 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.
Comment 1 Namita Soman 2012-12-19 14:21:59 EST
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'
Comment 5 Martin Kosek 2012-12-20 09:57:02 EST
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
Comment 10 Xiyang Dong 2013-01-29 11:05:44 EST
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.
Comment 12 errata-xmlrpc 2013-02-21 04:31:26 EST
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

Note You need to log in before you can comment on or make changes to this bug.