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 7ea5e3671..95e628cd0 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -33,6 +33,7 @@ from ipalib.cli import to_cli, from_cli
from ipalib import output
from ipalib.text import _
from ipalib.util import json_serialize
+from ipalib.dn import *
global_output_params = (
Str('member',
@@ -318,7 +319,9 @@ class LDAPObject(Object):
return ''
except errors.NotFound:
pass
- return dn[len(self.primary_key.name) + 1:dn.find(',')]
+ # DN object assures we're returning a decoded (unescaped) value
+ dn = DN(dn)
+ return dn[self.primary_key.name]
def get_ancestor_primary_keys(self):
if self.parent_object: