From: Michael Tremer Date: Thu, 18 Apr 2019 10:21:02 +0000 (+0100) Subject: nopaste: Encode texts into bytes before sending them to the backend X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e0260ae6ec40b466a1b020f21209fa181957041;p=ipfire.org.git nopaste: Encode texts into bytes before sending them to the backend Signed-off-by: Michael Tremer --- diff --git a/src/web/nopaste.py b/src/web/nopaste.py index 31d1d445..09a0c3c4 100644 --- a/src/web/nopaste.py +++ b/src/web/nopaste.py @@ -28,7 +28,7 @@ class CreateHandler(auth.CacheMixin, base.BaseHandler): if mode == "paste": subject = self.get_argument("subject", None) - content = self.get_argument("content") + content = self.get_argument("content", "").encode("utf-8") elif mode == "upload": for f in self.request.files.get("file"):