Univention Bugzilla – Attachment 8015 Details for
Bug 42423
UMC crashes if default container contains ","
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
42423.patch (text/plain), 1.56 KB, created by
Florian Best
on 2016-09-16 09:28:14 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-09-16 09:28:14 CEST
Size:
1.56 KB
patch
obsolete
>diff --git a/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py b/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py >index 251da1f..4c67a8d 100644 >--- a/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py >+++ b/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py >@@ -56,6 +56,7 @@ > > from ldap import LDAPError, NO_SUCH_OBJECT > from ldap.filter import filter_format >+from ldap.dn import explode_dn > > try: > import univention.admin.license >@@ -985,31 +986,11 @@ def ldap_dn2path(ldap_dn, include_rdn=True): > representation""" > > ldap_base = ucr.get('ldap/base') >- if ldap_base is None or not ldap_dn.endswith(ldap_base): >+ if not ldap_base or not ldap_dn.lower().endswith(ldap_base.lower()): > return ldap_dn >- rel_path = ldap_dn[: -1 * len(ldap_base)] >- path = [] >- for item in ldap_base.split(','): >- if not item: >- continue >- dummy, value = item.split('=', 1) >- path.insert(0, value) >- path = ['.'.join(path) + ':', ] >- if rel_path: >- if not include_rdn: >- lst = rel_path.split(',')[1: -1] >- else: >- lst = rel_path.split(',')[: -1] >- for item in lst: >- if not item: >- continue >- dummy, value = item.split('=', 1) >- path.insert(1, value) >- if not lst: >- path.insert(1, '') >- else: >- path.append('') >- return '/'.join(path) >+ rel_path = ldap_dn[:-(1 + len(ldap_base))] >+ rel_path = explode_dn(rel_path, True)[int(not include_rdn):] >+ return '%s:/%s' % ('.'.join(reversed(explode_dn(ldap_base, True))), '/'.join(reversed(rel_path))) > > > @LDAP_Connection
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42423
: 8015