remove email from admins contact form

This commit is contained in:
christopher morris 2022-09-20 00:46:17 -07:00 committed by Ben Rog-Wilhelm
parent 0889d71647
commit 37396d42b5
2 changed files with 1 additions and 10 deletions

View file

@ -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"<strong>Email</strong>: {email}\n"
message = f"<strong>Message</strong>:\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"]