[Zope-dev] bug in Confera

Service Informatique CHSR chsrinfo@guetali.fr
Tue, 9 Mar 1999 09:17:07 +0400


Message en plusieurs parties et au format MIME.

------=_NextPart_000_0004_01BE6A0D.9B057DA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hello,

I believe there is a bug in Confera: it sets a cookie that is
hardcoded to last until 31-Dec-99.
According to the spec, a cookie that is meant to last forever
have to last until (currentdate+one year).
Attached is a patch that adress that issue.

CurrentDate+OneYear is computed with:

e=(self.ZopeTime()+365).rfc822()

However, as stated some time ago, this poses problem on computers
where the timezone is odd (mine, for example. I had to patch DateTime.py)
So, If the above expression raise an exception, I end up in using
e='31-Dec-99 23:59:59 GMT'

Regards, Jephte CLAIN


------=_NextPart_000_0004_01BE6A0D.9B057DA0
Content-Type: application/octet-stream;
	name="Confera-1.2.0-cookie.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="Confera-1.2.0-cookie.patch"

ZGlmZiAtdXIgbGliL3B5dGhvbi9Qcm9kdWN0cy9Db25mZXJhL0NvbmZlcmEucHkgbGliLm9yaWcv
cHl0aG9uL1Byb2R1Y3RzL0NvbmZlcmEvQ29uZmVyYS5weQotLS0gbGliL3B5dGhvbi9Qcm9kdWN0
cy9Db25mZXJhL0NvbmZlcmEucHkJVHVlIE1hciAgOSAwODo0MDo0MCAxOTk5CisrKyBsaWIub3Jp
Zy9weXRob24vUHJvZHVjdHMvQ29uZmVyYS9Db25mZXJhLnB5CVR1ZSBNYXIgIDkgMDg6Mzg6NTIg
MTk5OQpAQCAtMzE0LDEwICszMTQsNyBAQAogICAgICAgICAgICAgcD0nJXMlcycgJSAoUkVRVUVT
VFsnU0NSSVBUX05BTUUnXSxSRVFVRVNUWydQQVRIX0lORk8nXSkKICAgICAgICAgICAgIHQ9c2Vs
Zi5pZAogICAgICAgICAgICAgcD1wWzoocmZpbmQocCx0KStsZW4odCkpXQotICAgICAgICAgICAg
dHJ5OgotICAgICAgICAgICAgICAgIGU9KHNlbGYuWm9wZVRpbWUoKSszNjUpLnJmYzgyMigpCi0g
ICAgICAgICAgICBleGNlcHQ6Ci0gICAgICAgICAgICAgICAgZT0nRnJpZGF5LCAzMS1EZWMtOTkg
MjM6NTk6NTkgR01UJworICAgICAgICAgICAgZT0nRnJpZGF5LCAzMS1EZWMtOTkgMjM6NTk6NTkg
R01UJwogICAgICAgICAgICAgcmVzcD1SRVFVRVNUWydSRVNQT05TRSddCiAgICAgICAgICAgICBy
ZXNwLnNldENvb2tpZSgnc3VnZ2VzdF9hdXRob3InLGF1dGhvcixwYXRoPXAsZXhwaXJlcz1lKQog
ICAgICAgICAgICAgcmVzcC5zZXRDb29raWUoJ3N1Z2dlc3RfZW1haWwnLGVtYWlsLHBhdGg9cCxl
eHBpcmVzPWUpCg==

------=_NextPart_000_0004_01BE6A0D.9B057DA0--