Bug 34522

Summary: Incorrect DN split in univention/uldap.py
Product: UCS Reporter: Philipp Hahn <hahn>
Component: LDAPAssignee: Philipp Hahn <hahn>
Status: CLOSED DUPLICATE QA Contact: Florian Best <best>
Severity: normal    
Priority: P5 CC: gohmann
Version: UCS 3.2   
Target Milestone: UCS 3.x   
Hardware: All   
OS: Linux   
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:

Description Philipp Hahn univentionstaff 2014-04-10 09:48:37 CEST
',' in RDNs might be esacped as '\n', which breaks splitting, probably use <http://www.python-ldap.org/doc/html/ldap-dn.html#ldap.dn.str2dn>:
/usr/share/pyshared/univention/uldap.py:
 52         pos=dn.find(',')+1
 61         exploded_dn=dn.split(',')
461                         if dn.startswith(key+'='):
Does not work with multi-valued RDN, e.g. "foo=1+bar=2"
522                 oldrdn = dn[:dn.find(',')]
523                 oldsdn = dn[dn.find(',')+1:]
524                 newrdn = newdn[:newdn.find(',')]
525                 newsdn = newdn[newdn.find(',')+1:]
Comment 1 Philipp Hahn univentionstaff 2016-07-20 10:35:26 CEST
r70653 Bug #40129: use official python-LDAP utilities
r70685 Bug #40041: make renaming of multi valued RDNs possible
...

*** This bug has been marked as a duplicate of bug 40129 ***