Commit 2f458b29 authored by matt@zope.com's avatar matt@zope.com

Updated with Steve Alexander's patch for the DTML validate recursion fix

parent 05209887
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.70 $'[11:-2] __version__='$Revision: 1.71 $'[11:-2]
import History import History
from Globals import HTML, DTMLFile, MessageDialog from Globals import HTML, DTMLFile, MessageDialog
...@@ -180,7 +180,11 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager, ...@@ -180,7 +180,11 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
security=getSecurityManager() security=getSecurityManager()
security.addContext(self) security.addContext(self)
if self.__dict__.has_key('validate'):
first_time_through = 0
else:
self.__dict__['validate'] = security.DTMLValidate self.__dict__['validate'] = security.DTMLValidate
first_time_through = 1
try: try:
if client is None: if client is None:
...@@ -200,8 +204,8 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager, ...@@ -200,8 +204,8 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
finally: finally:
security.removeContext(self) security.removeContext(self)
try: del self.__dict__['validate'] if first_time_through:
except: pass del self.__dict__['validate']
have_key=RESPONSE.headers.has_key have_key=RESPONSE.headers.has_key
if not (have_key('content-type') or have_key('Content-Type')): if not (have_key('content-type') or have_key('Content-Type')):
......
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