From 5e0260ae6ec40b466a1b020f21209fa181957041 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 18 Apr 2019 11:21:02 +0100 Subject: [PATCH] nopaste: Encode texts into bytes before sending them to the backend Signed-off-by: Michael Tremer --- src/web/nopaste.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"): -- 2.39.2