Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-859

guththila parser fails to handle escape sequences for ampersand, less than, greater than

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0
    • guththila
    • None
    • Windows XP, Visual Studio 2005, guththila parser, libcurl

    Description

      When an incoming message contains within text the escaped ampersand sequence, "&", this sequence is being passed to the client as raw text without being converted to the single ampersand character. Clearly, this action must take place at the level of the parser, as only the parser knows whether it is seeing simple text, and conversion is required, or text embedded in a CDATA section, where conversion is not allowed. I have tested the build with the libxml parser, and of course the libxml parser behaves correctly: the text passed to the client contains only the single ampersand character, not the escaped sequence. (See section 2.4 of XML 1.0 spec.)

      Looking at the code, I expect the same problem occurs with all escaped sequences, less than and greater than as well as ampersand, on both input and output. I also don't see where CDATA sections are handled, but as I am not seeing CDATA in the messages from the service I am hitting, I have not tested this case.

      Attachments

        1. diff_1.txt
          6 kB
          Lahiru Gunathilake
        2. diff_2.txt
          7 kB
          Bill Mitchell
        3. diff.txt
          6 kB
          Lahiru Gunathilake
        4. guththila_xml_writer.diff
          3 kB
          Bill Mitchell

        Activity

          People

            wtmitchell3 Bill Mitchell
            wtmitchell3 Bill Mitchell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: