Univention Bugzilla – Bug 56145
resync_object_from_s4.py --filter causes: TypeError: Filter must be string, not bytes
Last modified: 2023-06-21 09:24:42 CEST
Have patch, need bug.
In a support case this command was run: /usr/share/univention-s4-connector/resync_object_from_s4.py --filter CN=krbtgt And it resulted in a reject with this traceback: ==================================================== 11.06.2023 00:00:08.243 LDAP (PROCESS): sync AD > UCS: Resync rejected dn: 'CN=krbtgt,CN=Users,DC=domain,DC=net' 11.06.2023 00:00:08.243 LDAP (ERROR ): unexpected Error during s4.resync_rejected 11.06.2023 00:00:08.244 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/python3/dist-packages/univention/s4connector/s4/__init__.py", line 1760, in resync_rejected elements = self.__search_ad_changeUSN(change_usn, show_deleted=True) File "/usr/lib/python3/dist-packages/univention/s4connector/s4/__init__.py", line 965, in __search_ad_changeUSN usn_filter = format_escaped('(|(uSNChanged={0!e})(uSNCreated={0!e}))', changeUSN) File "/usr/lib/python3/dist-packages/univention/s4connector/s4/__init__.py", line 489, in format_escaped return LDAPEscapeFormatter().format(format_string, *args, **kwargs) File "/usr/lib/python3.7/string.py", line 186, in format return self.vformat(format_string, args, kwargs) File "/usr/lib/python3.7/string.py", line 190, in vformat result, _ = self._vformat(format_string, args, kwargs, used_args, 2) File "/usr/lib/python3.7/string.py", line 234, in _vformat obj = self.convert_field(obj, conversion) File "/usr/lib/python3/dist-packages/univention/s4connector/s4/__init__.py", line 474, in convert_field raise TypeError('Filter must be string, not bytes: %r' % (value,)) TypeError: Filter must be string, not bytes: b'4120' ==================================================== b0370e8d46 | Fix bytes decoding for resync_object_from_s4.py --filter I guess we should have a backport and then maybe also a resulting changelog entry.
Ok no new tracebacks are generated by using /usr/share/univention-s4-connector/resync_object_from_s4.py --filter Please note that already created rejects are not automatically cleaned up. Package update OK. No changelog needed. Verified
UCS 5.0-4 has been released: https://docs.software-univention.de/release-notes/5.0-4/en/ If this error occurs again, please use the 'Clone This Bug' option.