Ticket #1861 (new defect)

Opened 12 years ago

Last modified 11 years ago

Problem with checkUnderBase of LDAPBackingDirectory

Reported by: tracguest Owned by: madarche
Priority: P2 Milestone: CPS 3.5.7
Component: CPSDirectory Version: 3.4.3
Severity: normal Keywords:


Description : la méthode checkUnderBase renvoie l'erreur key error :isCanonicalDN(dn). On a constaté que si le dn comporte des espaces le bug se manifeste.

Solution : on a patché la méthode en formattant le dn voila le patch :

def adie_checkUnderBase(self, dn):
        """Check that dn is under the base."""
	URL=URL.split(" ")
	print URL
        for i in range(len(URL)):
        if not isCanonicalDN(dn):
            raise KeyError("DN '%s' is not canonical" % dn)
        if not (','+dn).endswith(','+self.ldap_base):
            raise ValueError("DN '%s' must be under base '%s'" %
                             (dn, self.ldap_base))

from Products.CPSDirectory import LDAPBackingDirectory
LDAPBackingDirectory.checkUnderBase = adie_checkUnderBase


LDAPBackingDirectoryPatch.py Download (2.4 KB) - added by tracguest 12 years ago.

Change History

Changed 12 years ago by tracguest

comment:1 Changed 11 years ago by madarche

  • Milestone set to CPS 3.4.6

Please give the example of a DN with spaces in it.

Note: See TracTickets for help on using tickets.