Santuario
  1. Santuario
  2. SANTUARIO-201

contextChild parameter of Transform.getInstance may be null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: Java 1.4.2
    • Fix Version/s: Java 1.4.4
    • Component/s: Java
    • Security Level: Public (Public issues, viewable by everyone)
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC

      Description

      The following method of the class org.apache.xml.security.transforms.Transform does not test if the contextChild parameter is null:
      public static final Transform getInstance(
      Document doc,
      String algorithmURI,
      Element contextChild)

      I propose this modified code to fix this bug:
      public static final Transform getInstance(
      Document doc, String algorithmURI, Element contextChild)
      throws InvalidTransformException {

      HelperNodeList contextNodes = null;

      if (contextChild != null)

      { contextNodes = new HelperNodeList(); XMLUtils.addReturnToElement(doc, contextNodes); contextNodes.appendChild(contextChild); XMLUtils.addReturnToElement(doc, contextNodes); }

      return Transform.getInstance(doc, algorithmURI, contextNodes);
      }

        Activity

        Julien Pasquier created issue -
        Hide
        Colm O hEigeartaigh added a comment -

        Fix applied.

        Colm.

        Show
        Colm O hEigeartaigh added a comment - Fix applied. Colm.
        Mark Thomas made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 47762 12492475
        Colm O hEigeartaigh made changes -
        Component/s Java [ 12314103 ]
        Component/s Signature [ 12314100 ]
        Colm O hEigeartaigh made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Colm O hEigeartaigh made changes -
        Assignee XML Security Developers Mailing List [ security-dev@xml.apache.org ]
        Fix Version/s Java 1.4.4 [ 12315956 ]
        Mark Thomas made changes -
        Workflow jira [ 12539380 ] Default workflow, editable Closed status [ 12565662 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565662 ] jira [ 12586654 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Julien Pasquier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development