mirror of
https://github.com/python/cpython.git
synced 2025-08-21 17:25:34 +00:00
HTML-escape the plain traceback in cgitb's HTML output, to prevent
the traceback inadvertently or maliciously closing the comment and injecting HTML into the error page. (backport from rev. 55348)
This commit is contained in:
parent
0d338e4bc6
commit
4c87581c32
2 changed files with 6 additions and 1 deletions
|
@ -183,7 +183,8 @@ function calls leading up to the error, in the order they occurred.</p>'''
|
||||||
|
|
||||||
%s
|
%s
|
||||||
-->
|
-->
|
||||||
''' % ''.join(traceback.format_exception(etype, evalue, etb))
|
''' % pydoc.html.escape(
|
||||||
|
''.join(traceback.format_exception(etype, evalue, etb)))
|
||||||
|
|
||||||
def text((etype, evalue, etb), context=5):
|
def text((etype, evalue, etb), context=5):
|
||||||
"""Return a plain text document describing a given traceback."""
|
"""Return a plain text document describing a given traceback."""
|
||||||
|
|
|
@ -12,6 +12,10 @@ What's New in Python 2.5.2c1?
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- HTML-escape the plain traceback in cgitb's HTML output, to prevent
|
||||||
|
the traceback inadvertently or maliciously closing the comment and
|
||||||
|
injecting HTML into the error page.
|
||||||
|
|
||||||
- Bug #1290505: Properly clear time.strptime's locale cache when the locale
|
- Bug #1290505: Properly clear time.strptime's locale cache when the locale
|
||||||
changes between calls. Backport of r54646 and r54647.
|
changes between calls. Backport of r54646 and r54647.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue