Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: engine
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      27

      Description

      If configuration file contains parameters with entities (e.g. %lt, the XML
      serialization does not escape such characters resulting in invalid output.

        Activity

        Hide
        Santiago Pericas-Geertsen added a comment -

        Did you mean < instead of %lt;? If so, it would be a character entity. Would it be possible for you to
        attach a config file showing the problem?

        Show
        Santiago Pericas-Geertsen added a comment - Did you mean < instead of %lt;? If so, it would be a character entity. Would it be possible for you to attach a config file showing the problem?
        Hide
        dprunier added a comment -

        Yeah, the entity <. It is correcly decoded (thanks to jaxb) but when
        serialized to XM it is not encoded back to <. It is very easy to reproduce:
        simply add a param <param name="test" value="<" /> in any valid configuration
        file and look the XML report.

        Show
        dprunier added a comment - Yeah, the entity <. It is correcly decoded (thanks to jaxb) but when serialized to XM it is not encoded back to <. It is very easy to reproduce: simply add a param <param name="test" value="<" /> in any valid configuration file and look the XML report.
        Hide
        dprunier added a comment -

        BTW, the issue is the same for every element in the config file. The fact that
        it is actually parsed with a real XML parser but serialized printing strings to
        a file is very likely to lead to corruption of the output.

        Morover, this is a slightly different issue, but having parameter names
        serialized as element names may also leads to invalid XML (since parameters
        names are not explicitely restricted to NMTOKEN).

        Show
        dprunier added a comment - BTW, the issue is the same for every element in the config file. The fact that it is actually parsed with a real XML parser but serialized printing strings to a file is very likely to lead to corruption of the output. Morover, this is a slightly different issue, but having parameter names serialized as element names may also leads to invalid XML (since parameters names are not explicitely restricted to NMTOKEN).
        Hide
        Santiago Pericas-Geertsen added a comment -

        Sure, this makes sense. I believe someone else reported this before. It is kind of a global change, so I
        don't think I'll be able to get to it anytime soon. Hopefully, you can work around it.

        Show
        Santiago Pericas-Geertsen added a comment - Sure, this makes sense. I believe someone else reported this before. It is kind of a global change, so I don't think I'll be able to get to it anytime soon. Hopefully, you can work around it.
        Hide
        dprunier added a comment -

        This is not that much complicated to throw in a ContentHandler instead of a
        StringBuffer (done this millions of times), and that could be backward
        compatible (keeping the old method). If i have some time, i might give it a shot.

        For the parameter name as element name, this is not big deal, it should simply
        be checked by the schema.

        Thanks,

        Show
        dprunier added a comment - This is not that much complicated to throw in a ContentHandler instead of a StringBuffer (done this millions of times), and that could be backward compatible (keeping the old method). If i have some time, i might give it a shot. For the parameter name as element name, this is not big deal, it should simply be checked by the schema. Thanks,

          People

          • Assignee:
            Santiago Pericas-Geertsen
            Reporter:
            dprunier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: