summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2019-09-27 19:59:37 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-09-27 19:59:37 (GMT)
commite8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa (patch)
tree21492197b7eca061db3cc120a1fdadc686910e56 /Lib/xmlrpc
parentdd6117c6d7859fee57751593cd56f0862131de8b (diff)
downloadcpython-e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa.zip
cpython-e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa.tar.gz
cpython-e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa.tar.bz2
bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
Escape the server title of xmlrpc.server.DocXMLRPCServer when rendering the document page as HTML.
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r--Lib/xmlrpc/server.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
index f1c467e..32aba4d 100644
--- a/Lib/xmlrpc/server.py
+++ b/Lib/xmlrpc/server.py
@@ -108,6 +108,7 @@ from xmlrpc.client import Fault, dumps, loads, gzip_encode, gzip_decode
from http.server import BaseHTTPRequestHandler
from functools import partial
from inspect import signature
+import html
import http.server
import socketserver
import sys
@@ -894,7 +895,7 @@ class XMLRPCDocGenerator:
methods
)
- return documenter.page(self.server_title, documentation)
+ return documenter.page(html.escape(self.server_title), documentation)
class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
"""XML-RPC and documentation request handler class.