For python3 we need to explicit know about the encoding for every UDM property and LDAP attribute. We should get rid of the decode_ignorelist in univention.uldap.access() and in univention.s4connector.s4. We should get rid of the UCR variable 'ldap/binaryattributes'. We should get rid of the DECODE_IGNORELIST in univention.s4connector.s4. We should get rid of compatible_modstring() in univention.s4connector.s4. Every univention.admin.property() should have the information which encoding the property has. The mapping from LDAP attributes (UDM oldattr) to UDM properties (UDM info) should apply the encoding. LDAP attributes are python "bytes", UDM properties are python "unicode" objects. Most attributes can have encoding='UTF-8'. All binary attributes must use encoding='latin-1'. The mapping in the S4-Connector should also have the encoding information for each attribute (ucs_attribute, ldap_attribute, con_attribute). Information about the encoding per LDAP syntax of each attribute can be obtained at: https://tools.ietf.org/html/rfc4517 https://social.technet.microsoft.com/wiki/contents/articles/52570.active-directory-syntaxes-of-attributes.aspx
(In reply to Florian Best from comment #0) > For python3 we need to explicit know about the encoding for every UDM > property and LDAP attribute. > > We should get rid of the decode_ignorelist in univention.uldap.access() and > in univention.s4connector.s4. partly done. UDM only still uses it with Python 2. > We should get rid of the UCR variable 'ldap/binaryattributes'. TODO > We should get rid of the DECODE_IGNORELIST in univention.s4connector.s4. done > We should get rid of compatible_modstring() in univention.s4connector.s4. done > Every univention.admin.property() should have the information which encoding > the property has. done > The mapping from LDAP attributes (UDM oldattr) to UDM properties (UDM info) > should apply the encoding. LDAP attributes are python "bytes", UDM > properties are python "unicode" objects. > Most attributes can have encoding='UTF-8'. All binary attributes must use > encoding='latin-1'. done (binary attributes are decoded with base64) > The mapping in the S4-Connector should also have the encoding information > for each attribute (ucs_attribute, ldap_attribute, con_attribute). done: `con_attribute_encoding`
QA: code review: OK changelog entry: OK decode_ignorelist not used anymore: OK searching compatible_modstring returns no results in code: OK
univention-python (14.0.5) 8723aea0a978 | refactor(udm): remove decode_ignorelist univention-lib (10.0.6) 8723aea0a978 | refactor(udm): remove decode_ignorelist univention-directory-manager-modules (16.0.9) 8723aea0a978 | refactor(udm): remove decode_ignorelist univention-base-files (10.0.5) 8723aea0a978 | refactor(udm): remove decode_ignorelist ucs-test (11.0.12) 8723aea0a978 | refactor(udm): remove decode_ignorelist