l_ldap_str2dn should return unicode.
The documentation of LDAPberval_to_unicode_object says "use when the value is known to be text (for instance a distinguishedName)" and l_ldap_str2dn indeed operates on a distinguishedName.
This commit is contained in:
parent
87eb959787
commit
8a9465f4d1
|
@ -77,9 +77,9 @@ l_ldap_str2dn( PyObject* unused, PyObject *args )
|
|||
LDAPAVA *ava = rdn[j];
|
||||
PyObject *tuple;
|
||||
|
||||
tuple = Py_BuildValue("(O&O&i)",
|
||||
LDAPberval_to_object, &ava->la_attr,
|
||||
LDAPberval_to_object, &ava->la_value,
|
||||
tuple = Py_BuildValue("(O&O&i)",
|
||||
LDAPberval_to_unicode_object, &ava->la_attr,
|
||||
LDAPberval_to_unicode_object, &ava->la_value,
|
||||
ava->la_flags & ~(LDAP_AVA_FREE_ATTR|LDAP_AVA_FREE_VALUE));
|
||||
if (!tuple) {
|
||||
Py_DECREF(rdnlist);
|
||||
|
|
Loading…
Reference in New Issue