diff --git a/ietf/contrib/wizard.py b/ietf/contrib/wizard.py index caaf7f9fc..290e58f5e 100644 --- a/ietf/contrib/wizard.py +++ b/ietf/contrib/wizard.py @@ -134,10 +134,18 @@ class Wizard( object ): Subclasses may want to take into account request-specific information such as the IP address. """ - data = [(bf.name, bf.data) for bf in form] + [settings.SECRET_KEY] + data = [] + for bf in form: + if bf.data is None: + d = '' + else: + d = bf.data + data.append((bf.name, d)) + data.append(settings.SECRET_KEY) # Use HIGHEST_PROTOCOL because it's the most efficient. It requires # Python 2.3, but Django requires 2.3 anyway, so that's OK. #pickled = pickle.dumps(data, protocol=pickle.HIGHEST_PROTOCOL) + print "hashing %s" % data pickled = str(data) #XXX return md5.new(pickled).hexdigest()