From dde19f7d85da578ab8695924a995b7982b34c867 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 18 Jun 2022 19:50:03 +0200 Subject: [PATCH] fix 500 error related to variables --- files/routes/users.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/users.py b/files/routes/users.py index 8de0088845..6b9db86f39 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -710,11 +710,11 @@ def message2(v, username): @auth_required def messagereply(v): - message = request.values.get("body", "").strip()[:10000].strip() + body = request.values.get("body", "").strip()[:10000].strip() - if not message and not request.files.get("file"): return {"error": "Message is empty!"} + if not body and not request.files.get("file"): return {"error": "Message is empty!"} - if 'linkedin.com' in message: return {"error": "this domain 'linkedin.com' is banned"} + if 'linkedin.com' in body: return {"error": "this domain 'linkedin.com' is banned"} id = int(request.values.get("parent_id")) parent = get_comment(id, v=v) @@ -728,7 +728,7 @@ def messagereply(v): body = body.strip() - body_html = sanitize(message) + body_html = sanitize(body) c = Comment(author_id=v.id, parent_submission=None,