Bug 1273691

Summary: Escaped equals signs in deployment.properties not un-escaped when used
Product: [Fedora] Fedora Reporter: Eldon Rosenberg <Eldon.Rosenberg>
Component: icedtea-webAssignee: jiri vanek <jvanek>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dbhole, jvanek, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-24 14:59:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eldon Rosenberg 2015-10-21 03:26:31 UTC
Description of problem:
Control Panel (itweb-settings.itweb) escapes "=" characters with a backslash "\" in the deployment.plugin.jvm.arguments deployment.properties file value, but this is not un-escaped when used on the resultant command line, so -Dsome.key="somevalue" has no effect due to being passed as -Dsome.key\="somevalue".

Version-Release number of selected component (if applicable):
1.6.1-1.fc22

How reproducible:
Has always been reproduced when I add a JRE property definition to the JVM arguments field on the JVM Settings page in the IcedTea-Web Control Panel.  If I manually edit the deployment.properties file to ensure equals signs are not escaped, then the problem is not evident in the next browser session, but simply opening and closing the Control Panel will re-insert the backslash escaping, which elicits the problem in the following browser session.

Steps to Reproduce:
1. Open the IcedTea-Web Control Panel
2. Enter a JRE property definition such as -Ddummy.property="value"
3. Start a new browser session
4. Navigate to a URL that uses the Java plugin
5. Check the process list for the actual argument list passed to the JRE (e.g. ps x | grep "java .*plugin")

Actual results:
The -D property definition argument contains an escaped equals sign: "\="

Expected results:
The -D property definition argument contains an un-escaped equals sign: "="

Additional info:
The fact that this can be worked around, by manually editing the deployment.properties file to remove the backslash "\" before the equals sign, suggests that the escaping of equals signs in values is not essential for correctly reading values back from the file.  So the problem definition could alternatively read, "Equal signs in deployment.properties values should not be escaped", unless there is some important reason (security or otherwise) for escaping them.

Comment 1 jiri vanek 2015-12-16 09:30:24 UTC
This is indeed bug.
Java part is de-escaping  \= correctly, but miniparser in C part do not.

Comment 2 jiri vanek 2015-12-18 15:12:48 UTC
Hello, patch posted usptream 
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2015-December/034333.html

Comment 3 jiri vanek 2015-12-18 15:16:43 UTC
Eldon, if you are able to make custom build and test ITW with the patch in attachment of link in c#2 , it will be appreciated (but not necessary..) TY! If nothing else it may fasten up release with this patch.

Comment 4 jiri vanek 2016-01-24 14:59:11 UTC
hopefully...