| Summary: | user name containing underscore breaks the UsersActivityStatsService | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Portal Platform 4 | Reporter: | Gary Hu <garyhu2> | ||||
| Component: | Portal | Assignee: | Jboss Support <support-patch> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | |||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.3.0.GA_CP3 | CC: | epp-bugs | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.3.0.GA_CP3 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | http://jira.jboss.org/jira/browse/JBEPP-159 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-04-09 08:01:29 UTC | Type: | Support Patch | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Security: Removed: JBoss Internal Added: Public
Patch Instructions: Added: PATCH NAME:
JBEPP-159
PRODUCT NAME:
JBoss Enterprise Portal Platform
VERSION:
4.3 CP03
SHORT DESCRIPTION:
user name containing underscore breaks the UsersActivityStatsService
LONG DESCRIPTION:
If a user name contains underscore, for example "john_dow", it breaks the UsersActivityStatsService MBean sevice in current EPP 4.3-CP03 and older versions.
In this case, the UsersActivityStatsService returns "john" as the user id when invoking the method getActiveUsersIds or getActiveUsersNames.
In addition, UsersActivityStatsService returns the session id containing "_dow" when invoking the method getUsersActivities.
With this fix, the user id would be returned as "john_dow" when invoking the method getActiveUsersIds or getActiveUsersNames, the session id would not contain the "_dow" when invoking the method
getUsersActivities.
MANUAL INSTALL INSTRUCTIONS:
Rename $EPP_HOME/server/default/deploy/jboss-portal.sar/lib/portal-core-lib.jar to "portal-core-lib.replacedBy.JBEPP-159.jar.old"
Copy the new portal-core-lib.jar to $EPP_HOME/server/default/deploy/jboss-portal.sar/lib/portal-core-lib.jar
Rename $EPP_HOME/server/all/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar to "portal-core-lib.replacedBy.JBEPP-159.jar.old"
Copy the new portal-core-lib.jar to $EPP_HOME/server/all/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar
Rename $EPP_HOME/server/production/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar to "portal-core-lib.replacedBy.JBEPP-159.jar.old"
Copy the new portal-core-lib.jar to $EPP_HOME/server/production/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar
Follow this same procedure for any custom server configuration/profile that needs this patch.
COMPATIBILITY:
N/A
DEPENDENCIES:
N/A
SUPERSEDES:
N/A
SUPERSEDED BY:
JBoss EPP 4.3 CP04
CREATOR:
Gary Hu
DATE:
2010/02/09
SVN / CVS Isolated Branch: Added: http://svn.jboss.org/repos/portal/branches/Enterprise_Portal_Platform_4_3_GA_CP03_JBEPP-159 Attachment: Added: portal-core-lib.jar The patch is ready to test. To test it, you can create a user name with underscore from Admin portlet first. And then go to JMX console and find the MBean service UsersActivityStatsService, then invoke the method getActiveUsersIds and/or getActiveUsersNames. The parameter value used to invoke those methods could be 1800000 as used in the CurrentUsersPortlet sample shipped with EPP 4.3-CP03 - jboss-portal(-ha).sar/samples/portal-users-samples.sar. To test the method getUsersActivities to verify if the correct userid and session id are returned, you could add the following code in the sample CurrentUsersPortlet. (http://anonsvn.jboss.org/repos/portal/tags/Enterprise_Portal_Platform_4_3_GA_CP03/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java) Set<UserActivity> userAct = uass.getUsersActivities(period); java.util.Iterator it = userAct.iterator(); while(it.hasNext()) { UserActivity ua = (UserActivity) it.next(); System.out.println("userid="+ua.getId()+", sessionid="+ua.getSessionId()); } Patch Instructions: Removed: PATCH NAME:
JBEPP-159
PRODUCT NAME:
JBoss Enterprise Portal Platform
VERSION:
4.3 CP03
SHORT DESCRIPTION:
user name containing underscore breaks the UsersActivityStatsService
LONG DESCRIPTION:
If a user name contains underscore, for example "john_dow", it breaks the UsersActivityStatsService MBean sevice in current EPP 4.3-CP03 and older versions.
In this case, the UsersActivityStatsService returns "john" as the user id when invoking the method getActiveUsersIds or getActiveUsersNames.
In addition, UsersActivityStatsService returns the session id containing "_dow" when invoking the method getUsersActivities.
With this fix, the user id would be returned as "john_dow" when invoking the method getActiveUsersIds or getActiveUsersNames, the session id would not contain the "_dow" when invoking the method
getUsersActivities.
MANUAL INSTALL INSTRUCTIONS:
Rename $EPP_HOME/server/default/deploy/jboss-portal.sar/lib/portal-core-lib.jar to "portal-core-lib.replacedBy.JBEPP-159.jar.old"
Copy the new portal-core-lib.jar to $EPP_HOME/server/default/deploy/jboss-portal.sar/lib/portal-core-lib.jar
Rename $EPP_HOME/server/all/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar to "portal-core-lib.replacedBy.JBEPP-159.jar.old"
Copy the new portal-core-lib.jar to $EPP_HOME/server/all/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar
Rename $EPP_HOME/server/production/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar to "portal-core-lib.replacedBy.JBEPP-159.jar.old"
Copy the new portal-core-lib.jar to $EPP_HOME/server/production/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar
Follow this same procedure for any custom server configuration/profile that needs this patch.
COMPATIBILITY:
N/A
DEPENDENCIES:
N/A
SUPERSEDES:
N/A
SUPERSEDED BY:
JBoss EPP 4.3 CP04
CREATOR:
Gary Hu
DATE:
2010/02/09 Added: PATCH NAME:
JBEPP-159
PRODUCT NAME:
JBoss Enterprise Portal Platform
VERSION:
4.3 CP03
SHORT DESCRIPTION:
user name containing underscore breaks the UsersActivityStatsService
LONG DESCRIPTION:
If a user name contains underscore, for example "john_dow", it breaks the UsersActivityStatsService MBean sevice in current EPP 4.3-CP03 and older versions.
In this case, the UsersActivityStatsService returns "john" as the user id when invoking the method getActiveUsersIds or getActiveUsersNames.
In addition, UsersActivityStatsService returns the session id containing "_dow" when invoking the method getUsersActivities.
With this fix, the user id would be returned as "john_dow" when invoking the method getActiveUsersIds or getActiveUsersNames, the session id would not contain the "_dow" when invoking the method
getUsersActivities.
MANUAL INSTALL INSTRUCTIONS:
Replace $EPP_HOME/server/default/deploy/jboss-portal.sar/lib/portal-core-lib.jar with the attached jar
Replace $EPP_HOME/server/all/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar with the attached jar
Replace $EPP_HOME/server/production/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar with the attached jar
Follow this same procedure for any custom server configuration/profile that needs this patch.
COMPATIBILITY:
N/A
DEPENDENCIES:
N/A
SUPERSEDES:
N/A
SUPERSEDED BY:
JBoss EPP 4.3 CP04
CREATOR:
Gary Hu
DATE:
2010/02/09
JDK5 Testing: - http://hudson.qa.jboss.com/hudson/view/EPP/job/epp-4.3-jdk5-release/27/ - all tests passed, 3 failures due to the wsrp (already described here: https://jira.jboss.org/jira/browse/JBQA-2937?focusedCommentId=12500381#action_12500381) JDK6 Testing: - http://hudson.qa.jboss.com/hudson/view/EPP/job/epp-4.3-jdk6-release/34/ - all tests passed, 3 failures due to the wsrp (already described here: https://jira.jboss.org/jira/browse/JBQA-2937?focusedCommentId=12500381#action_12500381) Manual Verification: Original version: - created user in Admin portlet with username michal_vanco - re-login to portal with user michal_vanco - in Current Users portlet on default page I can see only [michal] - in jmx-console - UsersActivityStatsService, method getActiveUsersNames() returns only [michal], method getActiveUsersIds() returns [_vanco_15466A9E35717FAD2994FEE0FBD5E07E] Patched version: - created user in Admin portlet with username michal_vanco - re-login to portal with user michal_vanco - in Current Users portlet on default I can see [michal_vanco] - in jmx-console - UsersActivityStatsService, method getActiveUsersNames() returns [michal_vanco], method getActiveUsersIds() returns [15466A9E35717FAD2994FEE0FBD5E07E] Manual testing is done and works properly. md5sum of patched component: 09f61f32c252ef05cfad08708b1494ab portal-core-lib.jar Only waiting for HSQL DB Selenium Testing result... HSQL DB Selenium Testing done, result is here: http://hudson.qa.jboss.com/hudson/view/EPP/job/epp-db-hsql-selenium-patch-tests/32/ Only 2 failures because of wsrp BEA's producer temporarily down. Patch testing is done. Patch is OK, more in test result comments. The patch is available for download from the following location: https://support.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=2063 Patch Repository Link: Added: https://support.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=2063 Link: Added: This issue is related to JBEPP-157 |
Date of First Response: 2010-02-11 09:50:55 Patch Instructions: PATCH NAME: JBEPP-159 PRODUCT NAME: JBoss Enterprise Portal Platform VERSION: 4.3 CP03 SHORT DESCRIPTION: user name containing underscore breaks the UsersActivityStatsService LONG DESCRIPTION: If a user name contains underscore, for example "john_dow", it breaks the UsersActivityStatsService MBean sevice in current EPP 4.3-CP03 and older versions. In this case, the UsersActivityStatsService returns "john" as the user id when invoking the method getActiveUsersIds or getActiveUsersNames. In addition, UsersActivityStatsService returns the session id containing "_dow" when invoking the method getUsersActivities. With this fix, the user id would be returned as "john_dow" when invoking the method getActiveUsersIds or getActiveUsersNames, the session id would not contain the "_dow" when invoking the method getUsersActivities. MANUAL INSTALL INSTRUCTIONS: Replace $EPP_HOME/server/default/deploy/jboss-portal.sar/lib/portal-core-lib.jar with the attached jar Replace $EPP_HOME/server/all/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar with the attached jar Replace $EPP_HOME/server/production/deploy/jboss-portal-ha.sar/lib/portal-core-lib.jar with the attached jar Follow this same procedure for any custom server configuration/profile that needs this patch. COMPATIBILITY: N/A DEPENDENCIES: N/A SUPERSEDES: N/A SUPERSEDED BY: JBoss EPP 4.3 CP04 CREATOR: Gary Hu DATE: 2010/02/09 Patch Repository Link: https://support.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=2063 SVN / CVS Isolated Branch: http://svn.jboss.org/repos/portal/branches/Enterprise_Portal_Platform_4_3_GA_CP03_JBEPP-159 Support Case Reference: https://enterprise.redhat.com/issue-tracker/474923 project_key: JBEPP If a user name contains underscore, for example "john_dow", it breaks the UsersActivityStatsService MBean sevice in current EPP 4.3-CP03 and older versions. In this case, the UsersActivityStatsService returns "john" as the user id when invoking the method getActiveUsersIds or getActiveUsersNames. In addition, UsersActivityStatsService returns the session id containing "_dow" when invoking the method getUsersActivities. With this fix, the user id would be returned as "john_dow" when invoking the method getActiveUsersIds or getActiveUsersNames, the session id would not contain the "_dow" when invoking the method getUsersActivities.