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:
Aymeric Augustin 2014-04-01 09:47:34 +02:00 committed by Christian Heimes
parent 87eb959787
commit 8a9465f4d1
1 changed files with 3 additions and 3 deletions

View File

@ -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);