From 04372e21dd6e08af059503c1d2661ad9b079920b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 23 Mar 2022 19:49:52 +0100 Subject: [PATCH] events: handle types in event contexts Signed-off-by: Jens Langhammer #2572 --- authentik/events/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/events/utils.py b/authentik/events/utils.py index 32c3b4466..1d2ebf284 100644 --- a/authentik/events/utils.py +++ b/authentik/events/utils.py @@ -93,6 +93,8 @@ def sanitize_dict(source: dict[Any, Any]) -> dict[Any, Any]: final_dict[key] = value.hex elif isinstance(value, (HttpRequest, WSGIRequest)): continue + elif isinstance(value, type): + final_dict[key] = value.__module__ + "." + value.__name__ else: final_dict[key] = value return final_dict