Bug 793075 (JBEPP-157) - user name containing underscore breaks the UsersActivityStatsService
Summary: user name containing underscore breaks the UsersActivityStatsService
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-157
Product: JBoss Enterprise Portal Platform 4
Classification: JBoss
Component: unspecified
Version: 4.3.0.GA_CP3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3.0.GA_CP5
Assignee: Gary Hu
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-03 16:49 UTC by Gary Hu
Modified: 2010-04-23 14:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-08 23:08:54 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 793077 0 high CLOSED user name containing underscore breaks the UsersActivityStatsService 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBEPP-157 0 None None None Never

Internal Links: 793077

Description Gary Hu 2010-02-03 16:49:35 UTC
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/474923
project_key: JBEPP

JBPORTAL-2470 user name containing underscore breaks the UsersActivityStatsService

Comment 1 Gary Hu 2010-02-03 16:50:04 UTC
Link: Added: This issue depends JBPORTAL-2470


Comment 2 Gary Hu 2010-02-08 21:32:44 UTC
There is no need to back port to any portal version.  The fix will go to EPP 4.3-CP03 branch only. There's no dependence on the JBPORTAL-2470.  And here is the description of this issue.

 If a user name contains underscore, for example "john_dow", it breaks the UsersActivityStatsService MBean sevice.

This is the code from UsersActivityStatsServiceImpl:

 public void registerActivity(final UserActivity userActivity)
   {
      try
      {
         Notification notification = new Notification(Integer.toString(userActivity.getType()), this.getServiceName(),
               userActivity.getTimestamp(), userActivity.getTimestamp(), userActivity.getId() + "_"
                     + userActivity.getSessionId());
     ....
  
And here is the code from UserActivity:

public UserActivity(Notification notification)
   {
      if (notification.getMessage() == null)
      {
         throw new IllegalArgumentException("Id (notification message) cannot be null");
      }
      this.id = notification.getMessage().substring(0, notification.getMessage().indexOf("_"));
      this.sessionId = notification.getMessage().substring(notification.getMessage().indexOf("_"));
      this.timestamp = notification.getTimeStamp();
      this.type = Integer.parseInt(notification.getType());
   }
 
 

Comment 3 Gary Hu 2010-02-08 21:33:02 UTC
Link: Removed: This issue depends JBPORTAL-2470 


Comment 4 Gary Hu 2010-02-08 23:08:54 UTC
issue has been resolved.

Comment 5 Martin Weiler 2010-04-23 08:06:58 UTC
Link: Added: This issue related JBEPP-159


Comment 6 Gary Hu 2010-04-23 14:51:17 UTC
This fix has been committed to EPP 4.3 branch that will be picked up by next CP release.


Note You need to log in before you can comment on or make changes to this bug.