Bug 998768 - [origin_broker_86]The value of env variable will be incorrect if the value contains special character '='
[origin_broker_86]The value of env variable will be incorrect if the value co...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Master (Show other bugs)
2.x
All All
medium Severity medium
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-19 23:20 EDT by zhaozhanqi
Modified: 2015-05-14 20:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:53:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhaozhanqi 2013-08-19 23:20:41 EDT
Description of problem:
if the value of env variable contain special character '=', it will be added or updated successfully. But the value is incorrect.
for example, set name=foo and value=@im=ibus, the result will be 'foo=ibus'

Version-Release number of selected component (if applicable):
devenv_3676

How reproducible:
always

Steps to Reproduce:
1. creat one app 
2. add one env variable with special charcter '=' for this app
   curl -k -H 'Accept: application/xml' --user $user:$pass https://ec2-50-16-53-228.compute-1.amazonaws.com/broker/rest/applications/441479955229558381215744/environment-variables -X POST -d name=foo -d value=@im=ibus
3. check its env
   rhc ssh app --gear env|grep foo

Actual results:

[zqzhao@dhcp-13-222 build]$ rhc ssh app --gear env |grep foo
foo=ibus

Expected results:
foo=@im=ibus

Additional info:
Comment 1 Ravi Sankar 2013-08-20 15:42:29 EDT
Fixed in https://github.com/openshift/origin-server/pull/3439
Comment 2 zhaozhanqi 2013-08-21 22:11:22 EDT
Tested this issue on devenv_3683,it has been fixed. 

curl -k -H 'Accept: application/xml' --user zzhao@redhat.com:redhat https://$instance/broker/rest/applications/4edc59800acf11e3b0d412313d08bd61/environment-variables -X POST -d name=foo -d value=@dd=394=sg


[zqzhao@dhcp-13-222 .openshift]$ rhc ssh zqphp --gear env |grep foo
foo=@dd=394=sg
Comment 3 zhaozhanqi 2013-08-21 22:37:49 EDT
Tested this issue on devenv_stage_448 as well, it works well

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