From 101a05f5c2b667262648a8e453fcce9ed408b367 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 03 2015 12:53:56 +0000 Subject: Drop the csrf_token from the email sent upon error --- diff --git a/pagure/mail_logging.py b/pagure/mail_logging.py index e073a1a..1a15a54 100644 --- a/pagure/mail_logging.py +++ b/pagure/mail_logging.py @@ -92,7 +92,9 @@ class ContextInjector(logging.Filter): # pragma: no cover except RuntimeError: pass try: - record.form = flask.request.form + record.form = dict(flask.request.form) + if 'csrf_token' in record.form: + del(record.form['csrf_token']) except RuntimeError: pass