Index: TrustedExpression.py =================================================================== --- TrustedExpression.py (revision 10563) +++ TrustedExpression.py (working copy) @@ -7,18 +7,19 @@ from Products.PageTemplates.Expressions import \ SubPathExpr, PathExpr, \ StringExpr, \ - getEngine, installHandlers + getEngine, installHandlers,\ + SecureModuleImporter from ReuseUtils import rebindFunction +##class _ModuleImporter: +## def __getitem__(self, module): +## __import__(module) +## return modules[module] +###ModuleImporter = _ModuleImporter() -class _ModuleImporter: - def __getitem__(self, module): - __import__(module) - return modules[module] -ModuleImporter = _ModuleImporter() +ModuleImporter = SecureModuleImporter - def trustedTraverse(ob, path, ignored,): if not path: return self @@ -95,3 +96,4 @@ ) + Index: tests/products/FiveTest/interfaces.py =================================================================== --- tests/products/FiveTest/interfaces.py (revision 10563) +++ tests/products/FiveTest/interfaces.py (working copy) @@ -1,6 +1,9 @@ +from AccessControl import allow_module from zope.interface import Interface from zope.schema import Text, TextLine +allow_module('smtpd') + class IAdaptable(Interface): """This is a Zope 3 interface. """