From d2acd88d02a8b46b452440f57e8cc543b29b5774 Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Thu, 30 Nov 2017 08:17:22 +0100
Subject: [PATCH] Hide sensitive data

---
 scipost/views.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scipost/views.py b/scipost/views.py
index ba8fcf1dd..0b55b078c 100644
--- a/scipost/views.py
+++ b/scipost/views.py
@@ -1329,9 +1329,10 @@ def csrf_failure(request, reason=""):
     """
     # Filter out privacy data
     settings_dict = {}
-    for k in dir(request.POST):
-        if k.isupper():
-            settings_dict[k] = cleanse_setting(k, getattr(request.POST, k))
+
+    for key in request.POST.keys():
+        if key:
+            settings_dict[key] = cleanse_setting(key, request.POST[key])
 
     # Email content
     body = 'Error message: ' + reason + '\nUser: ' + str(request.user)
-- 
GitLab