tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users DeleteGroupsAction.java DeleteUsersAction.java
Date Thu, 17 Mar 2005 21:38:28 GMT
markt       2005/03/17 13:38:28

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanUtils.java
               webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users
                        DeleteGroupsAction.java DeleteUsersAction.java
  Log:
  Support managing users/groups with names containing '=' (and other odd characters) from
within
   the admin webapp.
   - Port of fixes for 28178 and 34033 from TC5
  
  Revision  Changes    Path
  1.51      +3 -3      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- MBeanUtils.java	26 Aug 2004 21:36:08 -0000	1.50
  +++ MBeanUtils.java	17 Mar 2005 21:38:28 -0000	1.51
  @@ -1173,7 +1173,7 @@
   
           ObjectName name = null;
           name = new ObjectName(domain + ":type=Group,groupname=" +
  -                              group.getGroupname() + ",database=" +
  +                              encodeStr(group.getGroupname()) + ",database=" +
                                 group.getUserDatabase().getId());
           return (name);
   
  @@ -1559,7 +1559,7 @@
   
           ObjectName name = null;
           name = new ObjectName(domain + ":type=User,username=" +
  -                              user.getUsername() + ",database=" +
  +                              encodeStr(user.getUsername()) + ",database=" +
                                 user.getUserDatabase().getId());
           return (name);
   
  
  
  
  1.4       +4 -2      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/DeleteGroupsAction.java
  
  Index: DeleteGroupsAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/DeleteGroupsAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DeleteGroupsAction.java	17 Mar 2005 20:51:03 -0000	1.3
  +++ DeleteGroupsAction.java	17 Mar 2005 21:38:28 -0000	1.4
  @@ -19,6 +19,7 @@
   
   
   import java.io.IOException;
  +import java.net.URLDecoder;
   import java.util.Locale;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServletRequest;
  @@ -126,7 +127,8 @@
   
               for (int i = 0; i < groups.length; i++) {
                   ObjectName oname = new ObjectName(groups[i]);
  -                params[0] = oname.getKeyProperty("groupname");
  +                params[0] =
  +                    URLDecoder.decode(oname.getKeyProperty("groupname"));
                   mserver.invoke(dname, "removeGroup",
                                  params, signature);
               }
  
  
  
  1.4       +3 -2      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/DeleteUsersAction.java
  
  Index: DeleteUsersAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/DeleteUsersAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DeleteUsersAction.java	17 Mar 2005 20:51:03 -0000	1.3
  +++ DeleteUsersAction.java	17 Mar 2005 21:38:28 -0000	1.4
  @@ -19,6 +19,7 @@
   
   
   import java.io.IOException;
  +import java.net.URLDecoder;
   import java.util.Locale;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServletRequest;
  @@ -126,7 +127,7 @@
   
               for (int i = 0; i < users.length; i++) {
                   ObjectName oname = new ObjectName(users[i]);
  -                params[0] = oname.getKeyProperty("username");
  +                params[0] = URLDecoder.decode(oname.getKeyProperty("username"));
                   mserver.invoke(dname, "removeUser",
                                  params, signature);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message