summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/baseldap.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins/baseldap.py')
-rw-r--r--ipalib/plugins/baseldap.py5
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,):