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

JnlpDownloadServlet doesn't handle newline character properly

    XMLWordPrintable

Details

    • b135

    Description

      Take the jnlp file below for example(there is no space before codebase)
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+"
      codebase="http://127.0.0.1:8080/runtimeArgs/html/"
       href="RuntimeArgsUnTrustedPrintHeapAtGC.jnlp">
        <information>
          <title>RuntimeArgs Test Applet Demo</title>
          <vendor>Sun Microsystems, Inc.</vendor>
          <offline-allowed />
         <shortcut online="false">
            <desktop/>
            <menu submenu="Sun Microsystems Applets"/>
          </shortcut>
        </information>
        <resources>
            <j2se version="1.5+" java-vm-args="-XX:+PrintHeapAtGC"/>
              <jar href="../classes/test.jar"/>
              <jar href="../classes/helper.jar"/>
          </resources>
          <applet-desc main-class="TestAppletRuntime" name="Java applet" height="400" width="600">
            <param name="testParams" value="-XX:+PrintHeapAtGC"/>
            <param name="myName" value="SecureArgUntrusted"/>
          </applet-desc>
      </jnlp>

      After JnlpDownloadServlet's processing it becomes
      <?xml version="1.0" encoding="UTF-8"?><jnlp spec="1.0+"codebase="http://127.0.0.1:8080/runtimeArgs/html/" href="RuntimeArgsUnTrustedPrintHeapAtGC.jnlp"> <information> <title>RuntimeArgs Test Applet Demo</title> <vendor>Sun Microsystems, Inc.</vendor> <offline-allowed /> <shortcut online="false"> <desktop/> <menu submenu="Sun Microsystems Applets"/> </shortcut> </information> <resources> <j2se version="1.5+" java-vm-args="-XX:+PrintHeapAtGC"/> <jar href="../classes/test.jar"/> <jar href="../classes/helper.jar"/> </resources> <applet-desc main-class="TestAppletRuntime" name="Java applet" height="400" width="600"> <param name="testParams" value="-XX:+PrintHeapAtGC"/> <param name="myName" value="SecureArgUntrusted"/> </applet-desc></jnlp>

      there is no space between "spec" and "codebase" attributes, the jnlp xml is not valid.

      Attachments

        Issue Links

          Activity

            People

              herrick Andy Herrick (Inactive)
              qgong Fred Gong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: