mirror of
https://github.com/9001/copyparty.git
synced 2025-08-20 02:12:20 -06:00
fix mostly-harmless xss
This commit is contained in:
parent
2a1cda42e7
commit
73fa70b41f
|
@ -349,8 +349,11 @@ class HttpCli(object):
|
||||||
return body
|
return body
|
||||||
|
|
||||||
def loud_reply(self, body, *args, **kwargs):
|
def loud_reply(self, body, *args, **kwargs):
|
||||||
|
if not kwargs.get("mime"):
|
||||||
|
kwargs["mime"] = "text/plain; charset=utf-8"
|
||||||
|
|
||||||
self.log(body.rstrip())
|
self.log(body.rstrip())
|
||||||
self.reply(b"<pre>" + body.encode("utf-8") + b"\r\n", *list(args), **kwargs)
|
self.reply(body.encode("utf-8") + b"\r\n", *list(args), **kwargs)
|
||||||
|
|
||||||
def urlq(self, add, rm):
|
def urlq(self, add, rm):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue