Commit 55e0fc2a authored by 's avatar

Made string unpickling more paranoid

parent b812c045
"""Restricted unpickler""" """Restricted unpickler"""
__version__='$Revision: 1.1 $'[11:-2] __version__='$Revision: 1.2 $'[11:-2]
import pickle import pickle
...@@ -12,7 +12,8 @@ class Unpickler(pickle.Unpickler): ...@@ -12,7 +12,8 @@ class Unpickler(pickle.Unpickler):
try: return reg[(module,name)] try: return reg[(module,name)]
except: raise SystemError, 'Class not registered' except: raise SystemError, 'Class not registered'
def load_string(self):
raise 'BadPickle', 'Non binstring'
# Public interface # Public interface
......
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