diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-08-15 16:30:24 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-08-16 12:52:23 +0200 |
commit | bb5788fc7e1278d7d342e403248f7ccc58dfd6ed (patch) | |
tree | 1003ce762f389def075dbbbf4a4a71b0f54b1d29 | |
parent | 9ab599bcbae5f07081765a98e9b21bb5fdb87f45 (diff) | |
download | freeipa-bb5788fc7e1278d7d342e403248f7ccc58dfd6ed.tar.gz freeipa-bb5788fc7e1278d7d342e403248f7ccc58dfd6ed.tar.xz freeipa-bb5788fc7e1278d7d342e403248f7ccc58dfd6ed.zip |
Raise proper exception when given a bad DN attribute.
-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 e05f59ff4..011d62629 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,): |