summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTobias Bengfort <tobias.bengfort@posteo.de>2022-10-26 12:30:44 +0200
committerCarlton Gibson <carlton@noumenal.es>2022-10-26 14:39:58 +0200
commit350455b666a289d336fca770578887ce51f1aebe (patch)
tree0b9811c660d1d73a2894fd145ac304bc4ba54b49 /tests
parentb440493eaad28f093278a7a6981386dd5a989a74 (diff)
Fixed #33606 -- Cleansed sessionid cookie in error reports.
Co-authored-by: Simon Charette <charette.s@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/view_tests/tests/test_debug.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index 5a07131349..7224a2b6b6 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -1696,6 +1696,12 @@ class ExceptionReporterFilterTests(
)
self.assertNotIn(b"super_secret", response.content)
+ @override_settings(SESSION_COOKIE_NAME="djangosession")
+ def test_cleanse_session_cookie_value(self):
+ self.client.cookies.load({"djangosession": "should not be displayed"})
+ response = self.client.get("/raises500/")
+ self.assertNotContains(response, "should not be displayed", status_code=500)
+
class CustomExceptionReporterFilter(SafeExceptionReporterFilter):
cleansed_substitute = "XXXXXXXXXXXXXXXXXXXX"