Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is my injection point in datastring
- def deserialize(datastring):
- return pickle.loads(base64.decodestring(datastring))
- # Datastring gets passed to deserialize here:
- def load(session_id, connection):
- '''Load the session from storage.'''
- try:
- value = connection.get(session_id)
- if value:
- data = value.split(':', 1)[0]
- kwargs = MemcachedSession.deserialize(data)
- return MemcachedSession(connection, **kwargs)
- except:
- return None
- return None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement