Bug 1010614

Summary: OPENSHIFT_SECRET_TOKEN can be reset to a value begin with a digit
Product: OpenShift Online Reporter: Yan Du <yadu>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.x   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-22 04:44:38 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 Yan Du 2013-09-22 03:27:00 UTC
Description of problem:
OPENSHIFT_SECRET_TOKEN can be reset to a value begin with a digit

[root@Daphne ]# rhc set-env OPENSHIFT_SECRET_TOKEN=1213213213fdfdfdfdfdf -a wordpressSetting environment variable(s) ... done



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


How reproducible:
Always


Steps to Reproduce:

1. create an app
2. reset the OPENSHIFT_SECRET_TOKEN without enter an environment variable:
   #rhc set-env OPENSHIFT_SECRET_TOKEN -a wordpress -n 111
3. reset the OPENSHIFT_SECRET_TOKEN with a value begin with digit
4. reset the OPENSHIFT_SECRET_TOKEN with a value contain some special characters
5. connect to the app and check the value



Actual results:
step2:
[root@Daphne railsapp]# rhc set-env OPENSHIFT_SECRET_TOKEN -a wordpress -n 111
Environment variable(s) not provided.
Please provide at least one environment variable using the syntax VARIABLE=VALUE. VARIABLE can only contain
letters, digits and underscore ('_') and can't begin with a digit.


step3:
[root@Daphne ]# rhc set-env OPENSHIFT_SECRET_TOKEN=1213213213fdfdfdfdfdf -a wordpressSetting environment variable(s) ... done


step4:
[root@Daphne ]# rhc set-env OPENSHIFT_SECRET_TOKEN=dsjdsdlsklrueoufjdkljflsdkflsdlksl123%^^ -a wordpress 
Setting environment variable(s) ... done


in step2, the return message show that we can't set set OPENSHIFT_SECRET_TOKEN as an value begin with a digit. but in step3-4, the value can be set successfully



Expected results:
should not allow to set a value begin with a digit or contain some special characters

Comment 1 Yan Du 2013-09-22 04:44:38 UTC
Just the VARIABLE can only contain
letters, digits and underscore ('_') and can't begin with a digit, not the value.

sorry for mistake the return message.