Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3438

LdapExtLoginModule does not handle roles containing '/' correctly

    XMLWordPrintable

Details

    Description

      File: /jbosssx/src/main/org/jboss/security/auth/spi/LdapExtLoginModule.java (revision 1.7)
      Method: protected void rolesSearch(InitialLdapContext ctx, SearchControls constraints, String user, String userDN, int recursionMax, int nesting)
      Line: 407 "String dn = sr.getName() + "," + rolesCtxDN;"

      Summary:
      Under some conditions the string returned by sr.getName() may include inverted commas ("). When the dn variable is created by concatenating sr.getName() with rolesCtxDN the inverted comma is placed in the middle of the dn string. When ctx.getAttributes(dn, attrNames) is called (on line 409) an InvalidNameException is thrown. The exception is generated by the javax.naming.NameImpl, reporting "close quote appears before end of component".

      Conditions:
      This problem seems to occur when a '/' character is present in the name of the search result. In other words, under MS active directory if the name is of the form 'abc/def' it will be returned surrounded by inverted commas ie '"abc/def"'.

      Attachments

        Activity

          People

            anil.saldhana Anil Saldanha (Inactive)
            johk_jira johnstok - (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: