Univention Bugzilla – Bug 42791
missing ldap filter escaping in UDM scripts
Last modified: 2019-03-27 13:29:18 CET
management/univention-directory-manager-modules/python-lib/password.py → filter = 'krb5PrincipalName=%s' % username → filter = 'uid=%s' % username management/univention-directory-manager-modules/scripts/lock_expired_accounts → ldap_filter = '(&(shadowExpire>=%s)(shadowExpire<=%s))' % (today - 6, today,) a/management/univention-directory-manager-modules/scripts/proof_class_b_reverse → reverse = lo.search_s('cn=dns,%s' % baseDN, ldap.SCOPE_SUBTREE, '(&(relativeDomainName=%s)(pTRRecord=%s*))' % (string.join(entry, '.'), ldap.explode_dn(computers[i][0], 1)[0])) → lo.modrdn_s(reverse[0][0], 'relativeDomainName=%s' % entry) b/management/univention-directory-manager-modules/scripts/proof_dns_dhcp_records match_cmp_rec = lo.search_s(baseDN, ldap.SCOPE_SUBTREE, '(&(objectClass=univentionHost)(macAddress=%s))' % mac, []) match_cmp_rec = lo.search_s(baseDN, ldap.SCOPE_SUBTREE, '(&(objectClass=univentionHost)(aRecord=%s))' % comp[1]["aRecord"][0], []) b/management/univention-directory-manager-modules/scripts/univention-remove-old-umc-objects ref_objects = lo.searchDn(filter='univentionPolicyReference=%s' % pol_dn) management/univention-directory-manager-modules/scripts/proof_uniqueMembers: member_result = conn.search_s(basedn, ldap.SCOPE_SUBTREE, '(uid=%s)' % (member_uid,), ['objectClass'])
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Patch in fbest/42791-fix-ldap-filters
univention-directory-manager-modules (14.0.12-3) 2ca91ab7ce50 | Bug #42791: fix ldap filters univention-directory-manager-modules.yaml 2ca91ab7ce50 | Bug #42791: fix ldap filters
python-lib/password.py -> OK scripts/lock_expired_accounts -> OK scripts/proof_class_b_reverse -> OK scripts/proof_dns_dhcp_records -> OK scripts/proof_uniqueMembers -> OK scripts/univention-remove-old-umc-objects -> removed as discussed, because it was for the 2.4 to 3.0 upgrade (bug #24045) -> OK YAML -> OK
<http://errata.software-univention.de/ucs/4.4/19.html>