forked from Github-Mirrors/canaille
fix: crash when LDAP groups are refering to unexisting users
This commit is contained in:
parent
cba95cf666
commit
d9dbd8ad0e
2 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
|
||||
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
|
||||
|
||||
Fixed
|
||||
*****
|
||||
|
||||
- Avoid crashing when LDAP groups references unexisting users.
|
||||
|
||||
[0.0.35] - 2023-11-25
|
||||
=====================
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ def python_to_ldap(value, syntax, encode=True):
|
|||
value = "TRUE" if value else "FALSE"
|
||||
|
||||
if syntax == Syntax.DISTINGUISHED_NAME:
|
||||
value = value.id
|
||||
value = value.id if value else None
|
||||
|
||||
if not value:
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue