[Zope] Zope 2.6.3 and min (...)

Johan Carlsson johanc at easypublisher.com
Sun Jan 11 17:03:18 EST 2004


Gilles Lenfant wrote:
> I see that "min" and others have been removed from "secure" python (TTW
> scripts, dtml...).
> Is this a bug or a VERY BAD idea ?

It's already been submitted to the Collector (at least twice :-)

The attache patch, fixes the problem.

-- 
Johan Carlsson          Tel: + 46 8 31 24 94
Colliberty              Mob: + 46 70 558 25 24
Torsgatan 72            Email: johanc at easypublisher.com
SE-113 37 STOCKHOLM     Skype: colliberty
-------------- next part --------------
--- DT_Util.py.orig	Sat Jan 10 22:58:45 2004
+++ DT_Util.py	Sat Jan 10 22:56:43 2004
@@ -58,6 +58,11 @@
     else:
         d[name] = f
 
+from AccessControl.ZopeGuards import guarded_min, guarded_max
+
+d['min'] = NotBindable(guarded_min)
+d['max'] = NotBindable(guarded_max)
+
 if LIMITED_BUILTINS:
     # Replace certain builtins with limited versions.
     from RestrictedPython.Limits import limited_builtins


More information about the Zope mailing list