Compare commits
No commits in common. "047c9489fef5d3ace4f5ff2b84fad39a791fdde6" and "4c4d64cc3d0f19fd03635667e6b9da3ccf2b27c8" have entirely different histories.
047c9489fe
...
4c4d64cc3d
@ -5,9 +5,6 @@ Contact: ksp-servicestelle@sgdnord.rlp.de
|
|||||||
Created on: 11.12.23
|
Created on: 11.12.23
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import json
|
|
||||||
from json import JSONDecodeError
|
|
||||||
|
|
||||||
from django.views.debug import ExceptionReporter
|
from django.views.debug import ExceptionReporter
|
||||||
|
|
||||||
|
|
||||||
@ -42,8 +39,6 @@ class KonovaExceptionReporter(ExceptionReporter):
|
|||||||
"raising_view_name",
|
"raising_view_name",
|
||||||
"exception_type",
|
"exception_type",
|
||||||
"exception_value",
|
"exception_value",
|
||||||
"filtered_GET_items",
|
|
||||||
"filtered_POST_items",
|
|
||||||
]
|
]
|
||||||
clean_data = dict()
|
clean_data = dict()
|
||||||
for entry in whitelist:
|
for entry in whitelist:
|
||||||
@ -61,28 +56,7 @@ class KonovaExceptionReporter(ExceptionReporter):
|
|||||||
"""
|
"""
|
||||||
tb_data = super().get_traceback_data()
|
tb_data = super().get_traceback_data()
|
||||||
|
|
||||||
return_data = tb_data
|
|
||||||
if self.is_email:
|
if self.is_email:
|
||||||
filtered_data = dict()
|
tb_data = self._filter_traceback_data(tb_data)
|
||||||
filtered_data.update(self._filter_traceback_data(tb_data))
|
|
||||||
filtered_data.update(self._filter_POST_body(tb_data))
|
|
||||||
return_data = filtered_data
|
|
||||||
return return_data
|
|
||||||
|
|
||||||
def _filter_POST_body(self, tb_data: dict):
|
return tb_data
|
||||||
""" Filters POST body from traceback data
|
|
||||||
|
|
||||||
"""
|
|
||||||
post_data = tb_data.get("request", None)
|
|
||||||
if post_data:
|
|
||||||
post_data = post_data.body
|
|
||||||
try:
|
|
||||||
post_data = json.loads(post_data)
|
|
||||||
except JSONDecodeError:
|
|
||||||
pass
|
|
||||||
post_data = {
|
|
||||||
"filtered_POST_items": [
|
|
||||||
("body", post_data),
|
|
||||||
]
|
|
||||||
}
|
|
||||||
return post_data
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user