Commit a2e12be7 authored by Jason Madden's avatar Jason Madden

Add zodbpickle to server_find_global. Fixes #107

parent 711232ff
...@@ -4,7 +4,9 @@ Changelog ...@@ -4,7 +4,9 @@ Changelog
5.1.2 (unreleased) 5.1.2 (unreleased)
------------------ ------------------
- Nothing changed yet. - Allow ``zodbpickle.binary`` to be used in RPC requests, which is
necessary for compatibility with ZODB 5.4.0 on Python 2. See `issue
107 <https://github.com/zopefoundation/ZEO/issues/107>`_.
5.1.1 (2017-12-18) 5.1.1 (2017-12-18)
......
...@@ -156,9 +156,10 @@ def find_global(module, name): ...@@ -156,9 +156,10 @@ def find_global(module, name):
def server_find_global(module, name): def server_find_global(module, name):
"""Helper for message unpickler""" """Helper for message unpickler"""
if module not in ('ZopeUndo.Prefix', 'copy_reg', '__builtin__', 'zodbpickle'):
raise ImportError("Module not allowed: %s" % (module,))
try: try:
if module not in ('ZopeUndo.Prefix', 'copy_reg', '__builtin__'):
raise ImportError
m = __import__(module, _globals, _globals, _silly) m = __import__(module, _globals, _globals, _silly)
except ImportError as msg: except ImportError as msg:
raise ImportError("import error %s: %s" % (module, msg)) raise ImportError("import error %s: %s" % (module, msg))
......
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