Commit 6174ec71 authored by Chris Withers's avatar Chris Withers

Collector #685: made security declarations work for python packages

        that are not Zope products.
parent c2b5a461
......@@ -25,6 +25,9 @@ Zope Changes
Bugs Fixed
- Collector #685: made security declarations work for python packages
that are not Zope products.
- Collector #697: Multiple selection properties were incorrectly
marshalled. note than any non-ascii multiple selection properties
modified in versions without this fix will have been corrupted in
......
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.12 $'[11:-2]
__version__='$Revision: 1.13 $'[11:-2]
from RestrictedPython.Guards import safe_builtins, _full_read_guard, \
full_write_guard
......@@ -125,6 +125,10 @@ safe_builtins['map'] = guarded_map
import sys
def guarded_import(mname, globals={}, locals={}, fromlist=None):
# do initial import to give module a chance to make security declarations
__import__(mname, globals, locals, fromlist)
mnameparts = mname.split('.')
firstmname = mnameparts[0]
validate = getSecurityManager().validate
......
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