[Zope] Allowing Regular expressions in Python Script

Dieter Maurer dieter@handshake.de
Wed, 18 Sep 2002 20:50:07 +0200


Andreas Rippel writes:
 > ...
 > allow_module('re')
 > ... but when I'm calling e.g.
 > re.compile("a").match("ba", 1) in the script I get a authentification window from zope.
Regular expression objects and match objects are not itself
complex instances that would need security declarations to be used
in TTW code.

This is complicated because they are not (class) instances but instances
of types defined in "C". You cannot assign the necessary security
declarations directly.

You would need to define wrappers that can carry the security declarations
and delegate the requested operations.


Dieter