From 9e0daf2bcf77ec9fd34767c776044c28423b5ea7 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 27 Oct 2021 15:43:38 +0200 Subject: [PATCH] sources/ldap: skip values which are of type bytes Signed-off-by: Jens Langhammer --- authentik/sources/ldap/sync/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/sources/ldap/sync/base.py b/authentik/sources/ldap/sync/base.py index 6b3a00563..9c196595e 100644 --- a/authentik/sources/ldap/sync/base.py +++ b/authentik/sources/ldap/sync/base.py @@ -82,6 +82,8 @@ class BaseLDAPSynchronizer: value = mapping.evaluate(user=None, request=None, ldap=kwargs, dn=object_dn) if value is None: continue + if isinstance(value, (bytes)): + continue object_field = mapping.object_field if object_field.startswith("attributes."): # Because returning a list might desired, we can't