events: sanitize args and kwargs saved in system tasks (#8644)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		| @ -88,8 +88,8 @@ class SystemTask(TenantTask): | |||||||
|                 "duration": max(perf_counter() - self._start_precise, 0), |                 "duration": max(perf_counter() - self._start_precise, 0), | ||||||
|                 "task_call_module": self.__module__, |                 "task_call_module": self.__module__, | ||||||
|                 "task_call_func": self.__name__, |                 "task_call_func": self.__name__, | ||||||
|                 "task_call_args": args, |                 "task_call_args": sanitize_item(args), | ||||||
|                 "task_call_kwargs": kwargs, |                 "task_call_kwargs": sanitize_item(kwargs), | ||||||
|                 "status": self._status, |                 "status": self._status, | ||||||
|                 "messages": sanitize_item(self._messages), |                 "messages": sanitize_item(self._messages), | ||||||
|                 "expires": now() + timedelta(hours=self.result_timeout_hours), |                 "expires": now() + timedelta(hours=self.result_timeout_hours), | ||||||
| @ -113,8 +113,8 @@ class SystemTask(TenantTask): | |||||||
|                 "duration": max(perf_counter() - self._start_precise, 0), |                 "duration": max(perf_counter() - self._start_precise, 0), | ||||||
|                 "task_call_module": self.__module__, |                 "task_call_module": self.__module__, | ||||||
|                 "task_call_func": self.__name__, |                 "task_call_func": self.__name__, | ||||||
|                 "task_call_args": args, |                 "task_call_args": sanitize_item(args), | ||||||
|                 "task_call_kwargs": kwargs, |                 "task_call_kwargs": sanitize_item(kwargs), | ||||||
|                 "status": self._status, |                 "status": self._status, | ||||||
|                 "messages": sanitize_item(self._messages), |                 "messages": sanitize_item(self._messages), | ||||||
|                 "expires": now() + timedelta(hours=self.result_timeout_hours), |                 "expires": now() + timedelta(hours=self.result_timeout_hours), | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jens L
					Jens L