Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6438917

JNLP parser accepts illegal XML in comments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Other
    • P4
    • None
    • 6
    • deploy
    • sparc
    • solaris_2.5.1

    Backports

      Description

        If a JNLP file contains a comment with a double hyphen between the beginning ("<!--") and end ("-->") delimeters of the comment, the XML parser will accept the file and skip over the entire comment. However, according to the XML standard this is incorrect:

        http://www.w3.org/TR/2004/REC-xml-20040204/#sec-comments

        Specifically, the sentence "For compatibility, the string "--" (double-hyphen) MUST NOT occur within comments..." applies here. On the Mac this is a problem because we use the OS call CFXMLTreeCreateFromDataWithError when building a bundled application from the JNLP file, and it fails to parse the file because of the illegal comment in the file.

        This was reported by a developer as a bug on Mac OS X's Java because 'it works on other platforms', but the root problem is incorrect behavior in the shared code (see com.sun.deploy.xml.XMLParser.skipXMLComment())

        Attachments

          Issue Links

            Activity

              People

                stayer Kirill Kirichenko (Inactive)
                ksoshals Kirill Soshalskiy (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: