Bug 1273691 - Escaped equals signs in deployment.properties not un-escaped when used
Escaped equals signs in deployment.properties not un-escaped when used
Product: Fedora
Classification: Fedora
Component: icedtea-web (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-10-20 23:26 EDT by Eldon Rosenberg
Modified: 2016-01-24 09:59 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-24 09:59:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eldon Rosenberg 2015-10-20 23:26:31 EDT
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):

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 04:30:24 EST
This is indeed bug.
Java part is de-escaping  \= correctly, but miniparser in C part do not.
Comment 2 jiri vanek 2015-12-18 10:12:48 EST
Hello, patch posted usptream 
Comment 3 jiri vanek 2015-12-18 10:16:43 EST
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 09:59:11 EST

Note You need to log in before you can comment on or make changes to this bug.