From c05977f14496890269ce999a35eba08112cca2ee Mon Sep 17 00:00:00 2001 From: Jens L Date: Thu, 22 Feb 2024 11:55:23 +0100 Subject: [PATCH] events: sanitize args and kwargs saved in system tasks (#8644) Signed-off-by: Jens Langhammer --- authentik/events/system_tasks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/authentik/events/system_tasks.py b/authentik/events/system_tasks.py index 26535da80c..625203f42a 100644 --- a/authentik/events/system_tasks.py +++ b/authentik/events/system_tasks.py @@ -88,8 +88,8 @@ class SystemTask(TenantTask): "duration": max(perf_counter() - self._start_precise, 0), "task_call_module": self.__module__, "task_call_func": self.__name__, - "task_call_args": args, - "task_call_kwargs": kwargs, + "task_call_args": sanitize_item(args), + "task_call_kwargs": sanitize_item(kwargs), "status": self._status, "messages": sanitize_item(self._messages), "expires": now() + timedelta(hours=self.result_timeout_hours), @@ -113,8 +113,8 @@ class SystemTask(TenantTask): "duration": max(perf_counter() - self._start_precise, 0), "task_call_module": self.__module__, "task_call_func": self.__name__, - "task_call_args": args, - "task_call_kwargs": kwargs, + "task_call_args": sanitize_item(args), + "task_call_kwargs": sanitize_item(kwargs), "status": self._status, "messages": sanitize_item(self._messages), "expires": now() + timedelta(hours=self.result_timeout_hours),