From 37396d42b5f6b98fbf22db7dc2ae257b59d6f9f4 Mon Sep 17 00:00:00 2001 From: christopher morris Date: Tue, 20 Sep 2022 00:46:17 -0700 Subject: [PATCH] remove email from admins contact form --- files/routes/static.py | 5 +---- files/templates/contact.html | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 088f15e8f..ae471844e 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -295,14 +295,11 @@ def contact(v): @auth_required def submit_contact(v): body = request.values.get("message") - email = request.values.get("email") if not body: abort(400) - if not email: email = None header = "This message has been sent automatically to all admins via [/contact](/contact)\n" - email = f"Email: {email}\n" message = f"Message:\n{body}\n\n" - html = sanitize(f"{header}\n{email}\n{message}") + html = sanitize(f"{header}\n{message}") if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1": file=request.files["file"] diff --git a/files/templates/contact.html b/files/templates/contact.html index c74f3921c..8590924b8 100644 --- a/files/templates/contact.html +++ b/files/templates/contact.html @@ -23,12 +23,6 @@

Use this form to contact {{SITE_TITLE}} Admins.

- - {% if v and v.email %} - - {% else %} - - {% endif %}