diff options
Diffstat (limited to 'ipalib/plugins/baseldap.py')
-rw-r--r-- | ipalib/plugins/baseldap.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index e05f59ff..011d6262 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -809,7 +809,10 @@ last, after all sets and adds."""), value = None if ldap.has_dn_syntax(attr): - value = DN(value) + try: + value = DN(value) + except ValueError: + raise errors.InvalidSyntax(attr=attr) if attr in newdict: if type(value) in (tuple,): |