Bug 998768

Summary: [origin_broker_86]The value of env variable will be incorrect if the value contains special character '='
Product: OpenShift Online Reporter: zhaozhanqi <zzhao>
Component: MasterAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: rpenta, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-29 12:53:19 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 zhaozhanqi 2013-08-20 03:20:41 UTC
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 19:42:29 UTC
Fixed in https://github.com/openshift/origin-server/pull/3439

Comment 2 zhaozhanqi 2013-08-22 02:11:22 UTC
Tested this issue on devenv_3683,it has been fixed. 

curl -k -H 'Accept: application/xml' --user zzhao: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-22 02:37:49 UTC
Tested this issue on devenv_stage_448 as well, it works well