JDK-8199317 : Launched from browser, UTF-8 encoded argument in a JNLP file is not correctly passed to application
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 8u161
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2018-02-28
  • Updated: 2018-03-30
  • Resolved: 2018-03-30
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_172-ea"
Java(TM) SE Runtime Environment (build 1.8.0_172-ea-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b03, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]


EXTRA RELEVANT SYSTEM CONFIGURATION :
Web browser:
- Firefox 58.0.2 (64bit)
- Chrome 64.0.3282.186���Official Build��� ���64bit)
- InternetExplorer10


A DESCRIPTION OF THE PROBLEM :
By using web browser, .jnlp file can be launched, but passed argument string is not correctly encoded.


REGRESSION.  Last worked in version 8u152

ADDITIONAL REGRESSION INFORMATION: 
Uninstall 8u161 or later and re-install 8u152 or prior to reproduce the working test case.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Launch utf8.jnlp from web browsers.
Designate utf8.jnlp file from URL (such as file:// scheme) form can also reproduce.



REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
utf8.jnlp

Following argument attribute has UTF-8 encoded japanese letters as value.
<argument>--downloadFiles[0]=DownloadManagerSetupxxxxxxxxxxxxxxxxxxxxxxxxxx.exe</argument>

-------------utf8.jnlp begin ---------------
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.7+"
		codebase="http://127.0.0.1:9000/">
	<information>
		<title>SilverBulletDownloadClient</title>
		<vendor>Skeed Co. Ltd.</vendor>
		<homepage href="http://www.skeed.co.jp" />
		<description kind="one-line">SkeedSilverBullet Client</description>
		<description kind="short">SkeedSilverBullet Client</description>
		<description kind="tooltip">SkeedSilverBullet Client</description>
		<icon kind="default" href="http://127.0.0.1:9000/public/images/ssb_transparent.gif" />
		<icon kind="splash" href="http://127.0.0.1:9000/public/images/ssb_splash.jpg" />
		<offline-allowed/>
	</information>
	<security>
		<all-permissions />
	</security>
	<resources>
		<java version="1.7+" initial-heap-size="8M" max-heap-size="64M"/>
		<jar href="http://127.0.0.1:9000/public/jars/ssb_guic.jar"/>
		<property name="jnlp.packEnabled" value="true" />
	</resources>
	<application-desc main-class="com.skeedtech.skeed_silver_bullet.simple_gui_client.SimpleDownloaderMain">

		<argument>--downloadFiles[0]=DownloadManagerSetup - ��������� - ��������� (2) - ���������.exe</argument>

	</application-desc>
</jnlp>
--------------utf8.jnlp end--------------

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Using older java or 
limit functionality and/or change behavior of application.



Comments
The issue is rstricted to Japanese locale, so made sure that the display language is set to Japanese (Windows 10). Checked with submitter provided jnlp and could confirm the issue as repotrted. Results: ======== 8u144: OK 8u152: OK 8u161: Fail 8u172 b03: Fail 9.0.4: OK 10 ea b46: OK To verify locally, download the attached jnlp and jar files and run from respective browsers (Chrome, FF and IE 11). This .jar simply reads, prints and asserts arguments passed. Source file is archived archived in the .jar. Make sure to add the "file://" to exception site list in JCP. The utf8-test.jnlp file is launched from URL form of browsers (Chrome, Firefox, IE10): Results from JDK 8u144: ========================== Expected (javaws:11.144.2.01 and JRE:1.8.0_144-b01): "C:\Program Files\Java\jre1.8.0_144\bin\javaws.exe" utf8-test.jnlp ----<java console begin>---- Java Web Start 11.144.2.01 amd64 ........ 1.8.0_144-b01 Java HotSpot(TM) 64-Bit Server VM ... ACTUAL args[0] = [ARG1], EXPECTED args[0] = [ARG1] ACTUAL args[1] = [������������], EXPECTED args[1] = [������������] ACTUAL args[2] = [���������], EXPECTED args[2] = [���������] SUCCESS sleep 10 seconds to exit ----<java console end>---- Results from JDK 8u161: ==================================================================== ----<java console begin>---- Java Web Start 11.161.2.12 amd64 ... ---------------------------------------------------- ACTUAL args[0] = [ARG1], EXPECTED args[0] = [ARG1] ACTUAL args[1] = [?`?q?f?Q], EXPECTED args[1] = [������������] !!! FAILED, not equal !!! sleep 10 seconds to exit ----<java console end>---- =================================================================== This seems a regression occured from JDK 8u161.
14-03-2018

Reported with: ========== 8u172 ea b03 Windows 7 FF 58.0.2 (64-bit) Chrome 64 (64-bit) IE 10 Passed argument string fails to encode correctly when launching jnlp from browser. Checked this for JDK 8u172 ea b03 (reported version) Chrome 65 IE 11 FF 52.6.0 but couldn't reproduce the issue as reported. Checked with display language as English as well as Japanese. Results: ========== 8u172 ea b03: OK 8u162: Ok 9.0.4: Ok To verify, run the jnlp (subsequent comment) with respective Java version. Written back to the submitter to reconfirm the results at his end.
08-03-2018