Commit 79d1ef24 authored by Sebastien Robin's avatar Sebastien Robin

remove temporarly DateTime from pickle for cookie


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@843 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cdaa1c72
...@@ -40,6 +40,7 @@ from Selection import Selection ...@@ -40,6 +40,7 @@ from Selection import Selection
from email.MIMEBase import MIMEBase from email.MIMEBase import MIMEBase
from email import Encoders from email import Encoders
from copy import copy from copy import copy
from DateTime import DateTime
import md5 import md5
import pickle import pickle
import hmac import hmac
...@@ -735,6 +736,12 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -735,6 +736,12 @@ class SelectionTool( UniqueObject, SimpleItem ):
""" """
LOG('getPickleAndSignature kw',0,kw) LOG('getPickleAndSignature kw',0,kw)
cookie_password = self._getCookiePassword() cookie_password = self._getCookiePassword()
# XXX Remove DateTime, This is really bad, only use for zope 2.6
# XXX This has to be removed as quickly as possible
for k,v in kw.items():
if instance(v,DateTime):
del kw[k]
# XXX End of the part to remove
pickle_string = pickle.dumps(kw) pickle_string = pickle.dumps(kw)
msg = MIMEBase('application','octet-stream') msg = MIMEBase('application','octet-stream')
msg.set_payload(pickle_string) msg.set_payload(pickle_string)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment