Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1861

Check for Null URI in LDAPTransformer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.8, 2.1.9
    • 2.1.10, 2.2
    • Blocks: Naming
    • None
    • Normal
    • Patch available

    Description

      In the LDAPTransformer.java (src\blocks\naming\java\org\apache\cocoon\transformation\LDAPTransformer.java) the URI is not checked for NULL.
      On some J2EE servers (SAP NetWeaver) the URI passed may be NULL and it causes a NullPointerException.
      A simple fix is to add a check for NULL URI and just pass through that element:

           public void startElement(String uri, String name, String raw, Attributes attributes) throws SAXException {
      + if (uri == null) {
      + super.startElement(uri, name, raw, attributes);
      + return;
      + }
               if (!uri.equals(my_uri)) {
                   super.startElement(uri, name, raw, attributes);
                   return;

      Attachments

        1. LDAP stacktrace.htm
          15 kB
          Igor Naumov
        2. authenticateLDAP.xml
          2 kB
          Igor Naumov

        Activity

          People

            antonio Antonio Gallardo Rivera
            igorn Igor Naumov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: