tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm JDBCRealm.java
Date Tue, 06 Feb 2001 02:11:08 GMT
nacho       01/02/05 18:11:08

  Modified:    catalina/src/share/org/apache/catalina/realm JDBCRealm.java
  Log:
  Bugzilla Bugs #307  #407
  
  *Authentication failes using the JDBCRealm with Sybase ASE 11.9.2
  for Linux BugRat Report#560
  
  reported by: a.schweitz@2bconnected.nl (Allan Schweitz)
  
  *JDBCRealm: Call trim() on names and roles read
  out of database BugRat Report#707
  
  reported by arabung@experient.com (Adam Rabung)
  
  Revision  Changes    Path
  1.9       +3 -3      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
  
  Index: JDBCRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JDBCRealm.java	2000/12/31 16:30:35	1.8
  +++ JDBCRealm.java	2001/02/06 02:11:08	1.9
  @@ -396,13 +396,13 @@
   	    boolean found = false;
   	    if (rs1.next()) {
                   if( digest.equals("") || digest.equalsIgnoreCase("No")){
  -                    if(credentials.equals(rs1.getString(1))) {
  +                    if(credentials.equals(rs1.getString(1).trim())) {
                           if(debug >= 2)
                               log(sm.getString("jdbcRealm.authenticateSuccess",
                                                username));
                           found = true;
                       }else if (credentials.equals(
  -                                Digest(rs1.getString(1),digest))) {
  +                                Digest(rs1.getString(1).trim(),digest))) {
                           if (debug >= 2)
                               log(sm.getString("jdbcRealm.authenticateSuccess",
                                        username));
  @@ -424,7 +424,7 @@
   	    preparedRoles.setString(1, username);
   	    ResultSet rs2 = preparedRoles.executeQuery();
   	    while (rs2.next()) {
  -		principal.addRole(rs2.getString(1));
  +		principal.addRole(rs2.getString(1).trim());
   	    }
   	    rs2.close();
   	    return (principal);
  
  
  

Mime
View raw message