Commit f07df416 authored by Andreas Jung's avatar Andreas Jung

- LP #491224: proper escaping of rendered error message

parent ad2ff265
...@@ -8,6 +8,8 @@ Zope Changes ...@@ -8,6 +8,8 @@ Zope Changes
Bugs fixed Bugs fixed
- LP #491224: proper escaping of rendered error message
- Also look for ZEXP imports within the clienthome directory. This - Also look for ZEXP imports within the clienthome directory. This
provides a place to put imports that won't be clobbered by buildout provides a place to put imports that won't be clobbered by buildout
in a buildout-based Zope instance. in a buildout-based Zope instance.
......
...@@ -36,6 +36,7 @@ from DocumentTemplate.html_quote import html_quote ...@@ -36,6 +36,7 @@ from DocumentTemplate.html_quote import html_quote
from DocumentTemplate.ustr import ustr from DocumentTemplate.ustr import ustr
from ExtensionClass import Base from ExtensionClass import Base
from webdav.Resource import Resource from webdav.Resource import Resource
from webdav.xmltools import escape as xml_escape
from zExceptions import Redirect from zExceptions import Redirect
from zExceptions.ExceptionFormatter import format_exception from zExceptions.ExceptionFormatter import format_exception
from zope.interface import implements from zope.interface import implements
...@@ -228,6 +229,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable, ...@@ -228,6 +229,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable,
else: else:
v = HTML.__call__(s, client, REQUEST, **kwargs) v = HTML.__call__(s, client, REQUEST, **kwargs)
except: except:
logger.error( logger.error(
'Exception while rendering an error message', 'Exception while rendering an error message',
exc_info=True exc_info=True
...@@ -243,6 +245,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable, ...@@ -243,6 +245,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable,
"event log for full details: %s)")%( "event log for full details: %s)")%(
html_quote(sys.exc_info()[1]), html_quote(sys.exc_info()[1]),
)) ))
v = xml_escape(v)
raise error_type, v, tb raise error_type, v, tb
finally: finally:
if hasattr(self, '_v_eek'): del self._v_eek if hasattr(self, '_v_eek'): del self._v_eek
......
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