Bug 1150020

Summary: add-user utility doesn't escape names correctly
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Josef Cacek <jcacek>
Component: SecurityAssignee: Darran Lofthouse <darran.lofthouse>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Slavicek <pslavice>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.1CC: anmiller, bdawidow, darran.lofthouse, kkhan
Target Milestone: DR5   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
JBoss EAP 6's add user utility iterates the value being used as the key in a properties file and escapes all occurrences of special characters. In previous versions of the product, an error in how the characters were checked caused only the first instance of the 'equals' character (=) to be escaped. If a username contained a subsequent 'equals' character, it was not properly escaped, causing the generated properties file to be unusable. In this release, the special character handling is now corrected to handle all occurrences of the 'equals' character and usernames containing more than one are correctly written to the properties file.
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Josef Cacek 2014-10-07 09:26:04 UTC
When adding a user with name containing equal sign (=), only the first occurrence is escaped.

Reproducer:

./add-user.sh -u 'uid=jduke,ou=Users,dc=jboss,dc=org' -p admin.1234 -r ManagementRealm -g SuperUser

cat ../standalone/configuration/mgmt-users.properties

Actual output:
uid\=jduke,ou=Users,dc=jboss,dc=org=<HASH>

Expected output:
uid\=jduke,ou\=Users,dc\=jboss,dc\=org=<HASH>

Comment 1 JBoss JIRA Server 2014-10-13 14:10:54 UTC
Darran Lofthouse <darran.lofthouse> updated the status of jira WFCORE-163 to Coding In Progress