Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3.2
    • Component/s: None
    • Labels:
      None

      Description

      when there's a carriage return either before or after the name then you get strange null pointer exceptions in the DeploymentWebservice code as it expects the Xml to be in a particular form and text-nodes in the DOM really make it un-happy.

      This problem seems to be in the following code.

      OMElement zipPart = (OMElement) namePart.getNextOMSibling();

      This code is vulnerable if a carriage return is present after the <name> tag before <package> tag. AFAIK this happens because of the behaviour of Axiom. Axiom creates an OMText node for the carriage return. So when getNextOMSibling() is called instead of <package> element OMText is selected. But since the OMText cannot be cast to OMElement a ClassCastException occurs. This can be avoided by obtaining zipart OMElement with a call to getChild() or any related method which returns an OMElement reference. I can provide a patch for this if necessary.

      reported by Buddhika Chamith and Ciaran.

      see http://markmail.org/thread/pspxrl7qkhpraq4a

        Issue Links

          Activity

          Hide
          Alexis Midon added a comment -

          fixed in 1.x and trunk r767261

          Show
          Alexis Midon added a comment - fixed in 1.x and trunk r767261
          Hide
          Alexis Midon added a comment -

          ODE-591 does not expect request like below. The namespace expected by the code is wrong as well as the qname of the zip element.
          This was not detected by the unit tests because the request built in DeploymentTest in invalid.

          <!-- generated by SoapUI based on ode/axis2/src/main/wsdl/deploy.wsdl -->
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pmap="http://www.apache.org/ode/pmapi" xmlns:dep="http://www.apache.org/ode/deployapi" xmlns:xm="http://www.w3.org/2005/05/xmlmime">
          <soapenv:Header/>
          <soapenv:Body>
          <pmap:deploy>
          <name>?</name>
          <package>
          <dep:zip xm:contentType="application/?">cid:396563854230</dep:zip>
          </package>
          </pmap:deploy>
          </soapenv:Body>
          </soapenv:Envelope>

          Show
          Alexis Midon added a comment - ODE-591 does not expect request like below. The namespace expected by the code is wrong as well as the qname of the zip element. This was not detected by the unit tests because the request built in DeploymentTest in invalid. <!-- generated by SoapUI based on ode/axis2/src/main/wsdl/deploy.wsdl --> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pmap="http://www.apache.org/ode/pmapi" xmlns:dep="http://www.apache.org/ode/deployapi" xmlns:xm="http://www.w3.org/2005/05/xmlmime"> <soapenv:Header/> <soapenv:Body> <pmap:deploy> <name>?</name> <package> <dep:zip xm:contentType="application/?">cid:396563854230</dep:zip> </package> </pmap:deploy> </soapenv:Body> </soapenv:Envelope>
          Hide
          Alexis Midon added a comment -

          fixed in 1.X by r768094

          Show
          Alexis Midon added a comment - fixed in 1.X by r768094

            People

            • Assignee:
              Alexis Midon
              Reporter:
              Alexis Midon
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development