Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 531652

Summary: CRM #1963446 - Kickstart scripts on RHN ignores/removes braces (parenthesis)
Product: [Retired] Red Hat Network Reporter: Xixi <xdmoon>
Component: RHN/Web SiteAssignee: Grant Gainey <ggainey>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Network Quality Assurance <rhn-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: rhn512CC: acarter, acressma, dhughes, rhn-bugs, tao, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: Rally US512
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-17 23:36:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 531550    

Description Xixi 2009-10-29 01:18:57 UTC
Description of problem:
Save a kickstart script on RHN Hosted will remove (){} characters in it.

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

How reproducible:
Always.

Steps to Reproduce:
1. Click on any kickstart profile on RHN Hosted
2. Click on 'scripts' tab and then 'add new kickstart script'; or edit an existing kickstart script
3. '/bin/bash' as scripting language
4. In the textarea, enter:
mytest()
{
 echo "mytest"
}
5. Save changes by clicking on 'Update Kickstart'
  
Actual results:
The changes lose the () and {} and becomes
mytest

 echo "mytest"

Expected results:
It should be saved as is.

Additional info:

Comment 1 Xixi 2009-10-29 01:20:22 UTC
Proposed fix:

in webapps/WEB-INF/struts-config.xml:
change
        <form-bean name="kickstartScriptForm"
                   type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm">
to
        <form-bean name="kickstartScriptForm"
                   type="com.redhat.rhn.frontend.struts.DynaActionForm">

Comment 2 Grant Gainey 2009-11-11 21:08:30 UTC
Patch is a little off, needs to be 

type="org.apache.struts.action.DynaActionForm"

Otherwise, perfect.  Also, initial report has a perfect test case as well.

Comment 3 Denise Hughes 2009-11-13 16:04:48 UTC
Verified in webdev.