mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipaldap: Keep attribute names as text, not bytes
Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
1ce63e6193
commit
36094b2a54
@ -813,7 +813,7 @@ class LDAPClient(object):
|
|||||||
If there is a problem loading the schema or the attribute is
|
If there is a problem loading the schema or the attribute is
|
||||||
not in the schema return None
|
not in the schema return None
|
||||||
"""
|
"""
|
||||||
if isinstance(name_or_oid, unicode):
|
if six.PY2 and isinstance(name_or_oid, unicode):
|
||||||
name_or_oid = name_or_oid.encode('utf-8')
|
name_or_oid = name_or_oid.encode('utf-8')
|
||||||
|
|
||||||
if name_or_oid in self._SINGLE_VALUE_OVERRIDE:
|
if name_or_oid in self._SINGLE_VALUE_OVERRIDE:
|
||||||
@ -1516,7 +1516,7 @@ class LDAPClient(object):
|
|||||||
|
|
||||||
# pass arguments to python-ldap
|
# pass arguments to python-ldap
|
||||||
with self.error_handler():
|
with self.error_handler():
|
||||||
modlist = [(a, self.encode(b), self.encode(c))
|
modlist = [(a, str(b), self.encode(c))
|
||||||
for a, b, c in modlist]
|
for a, b, c in modlist]
|
||||||
self.conn.modify_s(str(entry.dn), modlist)
|
self.conn.modify_s(str(entry.dn), modlist)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user