Univention Bugzilla – Attachment 8014 Details for
Bug 34948
Windows client with umlauts creates error message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
34948.patch (text/plain), 6.81 KB, created by
Florian Best
on 2016-09-15 19:27:13 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-09-15 19:27:13 CEST
Size:
6.81 KB
patch
obsolete
>diff --git a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >index 0e2f308..f1a8251 100644 >--- a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >+++ b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >@@ -496,7 +496,7 @@ def _ldap_dn(self): > identifier = [] > for name, prop in self.descriptions.items(): > if prop.identifies: >- identifier.append((self.mapping.mapName(name), self.mapping.mapValue(name, self.info[name]), 2)) >+ identifier.append((self.mapping.mapName(name), self.mapping.mapValue(name, self.info[name]), ldap.AVA_BINARY)) > return '%s,%s' % (ldap.dn.dn2str([identifier]), self.position.getDn()) > > def _ldap_post_create(self): >@@ -1164,9 +1164,10 @@ def open( self ): > > # search forward zone and insert into the object > if self [ 'name' ]: >+ name = unicode(self['name']).encode('idna') > tmppos = univention.admin.uldap.position( self.position.getDomain( ) ) > >- searchFilter = filter_format('(&(objectClass=dNSZone)(relativeDomainName=%s)(!(cNAMERecord=*)))', [self['name']]) >+ searchFilter = filter_format('(&(objectClass=dNSZone)(relativeDomainName=%s)(!(cNAMERecord=*)))', [name,]) > try: > result = self.lo.search( base = tmppos.getBase( ),scope = 'domain', filter = searchFilter, attr = [ 'zoneName', 'aRecord', 'aAAARecord' ], unique = 0 ) > >@@ -1203,7 +1204,7 @@ def open( self ): > > if zoneNames: > for zoneName in zoneNames: >- searchFilter = filter_format('(&(objectClass=dNSZone)(|(PTRRecord=%s)(PTRRecord=%s.%s.)))', (self['name'], self['name'], zoneName[0])) >+ searchFilter = filter_format('(&(objectClass=dNSZone)(|(PTRRecord=%s)(PTRRecord=%s.%s.)))', (name, name, zoneName[0])) > try: > results = self.lo.search( base = tmppos.getBase( ),scope = 'domain', attr = [ 'relativeDomainName', 'zoneName' ], filter = searchFilter, unique = 0 ) > for dn, attr in results: >@@ -1221,7 +1222,7 @@ def open( self ): > > if zoneNames: > for zoneName in zoneNames: >- searchFilter = filter_format('(&(objectClass=dNSZone)(|(cNAMERecord=%s)(cNAMERecord=%s.%s.)))', (self['name'], self['name'], zoneName[0])) >+ searchFilter = filter_format('(&(objectClass=dNSZone)(|(cNAMERecord=%s)(cNAMERecord=%s.%s.)))', (name, name, zoneName[0])) > try: > results = self.lo.search( base = tmppos.getBase( ),scope = 'domain', attr = [ 'relativeDomainName', 'cNAMERecord', 'zoneName' ], filter = searchFilter, unique = 0 ) > for dn, attr in results: >@@ -1348,6 +1349,7 @@ def __modify_dhcp_object( self, position, name, ip, mac ): > > def __rename_dns_object( self, position = None, old_name = None, new_name = None ): > for dns_line in self[ 'dnsEntryZoneForward' ]: >+ old_name = unicode(old_name).encode('idna') > # dns_line may be the empty string > if not dns_line: > continue >@@ -1498,6 +1500,7 @@ def modify(rdn, zoneDN): > if dnsEntryZoneReverse: > rdn = self.calc_dns_reverse_entry_name( ip, dnsEntryZoneReverse ) > if rdn: >+ rdn = unicode(rdn).encode('idna') > modify(rdn, dnsEntryZoneReverse) > > elif ip: >@@ -1518,6 +1521,7 @@ def modify(rdn, zoneDN): > def __add_dns_reverse_object( self, name, zoneDn, ip ): > univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'we should create a dns reverse object: zoneDn="%s", name="%s", ip="%s"' % ( zoneDn, name, ip ) ) > if name and zoneDn and ip: >+ name = unicode(name).encode('idna') > univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'dns reverse object: start' ) > hostname_list = [] > if ':' in ip: # IPv6, e.g. ip=2001:db8:100::5 >@@ -1580,6 +1584,7 @@ def __add_dns_reverse_object( self, name, zoneDn, ip ): > def __remove_dns_forward_object( self, name, zoneDn, ip = None ): > univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'we should remove a dns forward object: zoneDn="%s", name="%s", ip="%s"' % ( zoneDn, name, ip ) ) > if name: >+ name = unicode(name).encode('idna') > # check if dns forward object has more than one ip address > if not ip: > if zoneDn: >@@ -1661,6 +1666,7 @@ def check_common_name_length(self): > def __modify_dns_forward_object( self, name, zoneDn, new_ip, old_ip ): > univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'we should modify a dns forward object: zoneDn="%s", name="%s", new_ip="%s", old_ip="%s"' % ( zoneDn, name, new_ip, old_ip ) ) > zone = None >+ name = unicode(name).encode('idna') > if old_ip and new_ip: > if not zoneDn: > tmppos = univention.admin.uldap.position( self.position.getDomain( ) ) >@@ -1718,6 +1724,7 @@ def __add_dns_forward_object( self, name, zoneDn, ip ): > > def __add_dns_forward_object_ipv6( self, name, zoneDn, ip ): > if name and ip and zoneDn: >+ name = unicode(name).encode('idna') > ip = ipaddr.IPv6Address(ip).exploded > results = self.lo.search( base = zoneDn, scope = 'domain', attr = [ 'aAAARecord' ], filter=filter_format('(&(relativeDomainName=%s)(!(cNAMERecord=*)))', (name,)), unique = 0 ) > if not results: >@@ -1746,6 +1753,7 @@ def __add_dns_forward_object_ipv6( self, name, zoneDn, ip ): > > def __add_dns_forward_object_ipv4( self, name, zoneDn, ip ): > if name and ip and zoneDn: >+ name = unicode(name).encode('idna') > results = self.lo.search( base = zoneDn, scope = 'domain', attr = [ 'aRecord' ], filter=filter_format('(&(relativeDomainName=%s)(!(cNAMERecord=*)))', (name,)), unique = 0 ) > if not results: > try: >@@ -1774,6 +1782,7 @@ def __add_dns_forward_object_ipv4( self, name, zoneDn, ip ): > > def __add_dns_alias_object( self, name, dnsForwardZone, dnsAliasZoneContainer, alias ): > univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'add a dns alias object: name="%s", dnsForwardZone="%s", dnsAliasZoneContainer="%s", alias="%s"' % ( name, dnsForwardZone, dnsAliasZoneContainer, alias ) ) >+ name = unicode(name).encode('idna') > if name and dnsForwardZone and dnsAliasZoneContainer and alias: > results = self.lo.search( base = dnsAliasZoneContainer, scope = 'domain', attr = [ 'cNAMERecord' ], filter=filter_format('relativeDomainName=%s', (alias,)), unique = 0 ) > if not results: >@@ -1795,6 +1804,7 @@ def __add_dns_alias_object( self, name, dnsForwardZone, dnsAliasZoneContainer, a > def __remove_dns_alias_object( self, name, dnsForwardZone, dnsAliasZoneContainer, alias = None ): > univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'remove a dns alias object: name="%s", dnsForwardZone="%s", dnsAliasZoneContainer="%s", alias="%s"' % ( name, dnsForwardZone, dnsAliasZoneContainer, alias ) ) > if name: >+ name = unicode(name).encode('idna') > if alias: > if dnsAliasZoneContainer: > self.lo.delete('relativeDomainName=%s,%s' % (ldap.dn.escape_dn_chars(alias), dnsAliasZoneContainer))
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 34948
: 8014