stevel      2002/12/17 16:39:55

  Modified:    java/src/org/apache/axis/utils Admin.java
               java/src/org/apache/axis/i18n resource.properties
  Log:
  adding a debug trace of what is going on wrt address comparison, and an error log if 
someone gets rejected. That way when we stop logging AxisFaults to the log, the fact 
that someone tried to admin the service gets remembered, including with the remote 
address.
  
  Also, marked up an existing FIXME exception with a TODO comment for the IDEs to 
catch.
  
  Revision  Changes    Path
  1.129     +9 -1      xml-axis/java/src/org/apache/axis/utils/Admin.java
  
  Index: Admin.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
  retrieving revision 1.128
  retrieving revision 1.129
  diff -u -r1.128 -r1.129
  --- Admin.java        11 Dec 2002 22:38:27 -0000      1.128
  +++ Admin.java        18 Dec 2002 00:39:55 -0000      1.129
  @@ -202,11 +202,18 @@
                       InetAddress myAddr = InetAddress.getLocalHost();
                       InetAddress remoteAddr =
                               InetAddress.getByName(remoteIP);
  +                    if(log.isDebugEnabled()) {
  +                        log.debug("Comparing remote caller " + remoteAddr +" to "+ 
myAddr);
  +                    }
   
  -                    if (!myAddr.equals(remoteAddr))
  +
  +                    if (!myAddr.equals(remoteAddr)) {
  +                        log.error(Messages.getMessage("noAdminAccess01",
  +                                remoteAddr.toString()));
                           throw new AxisFault("Server.Unauthorized",
                              Messages.getMessage("noAdminAccess00"),
                              null, null);
  +                    }
                   } catch (UnknownHostException e) {
                       throw new AxisFault("Server.UnknownHost",
                           Messages.getMessage("unknownHost00"),
  @@ -224,6 +231,7 @@
           }
   
           // Else fault
  +        // TODO: Better handling here
           throw new Exception("FIXME");
       }
   
  
  
  
  1.37      +1 -0      xml-axis/java/src/org/apache/axis/i18n/resource.properties
  
  Index: resource.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/i18n/resource.properties,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- resource.properties       6 Dec 2002 21:44:06 -0000       1.36
  +++ resource.properties       18 Dec 2002 00:39:55 -0000      1.37
  @@ -293,6 +293,7 @@
   
   no00=no {0}
   noAdminAccess00=Remote administrator access is not allowed!
  +noAdminAccess01=Rejected remote access from host {0}
   noArrayArray00=Arrays of arrays are not supported ''{0}''.
   
   # NOTE:  in noArrayType00, do no translate "arrayType"
  
  
  


Reply via email to