Return-Path: Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 13930 invoked by uid 500); 7 Feb 2001 15:04:39 -0000 Delivered-To: apmail-xml-axis-cvs@apache.org Received: (qmail 13927 invoked by uid 1136); 7 Feb 2001 15:04:39 -0000 Date: 7 Feb 2001 15:04:39 -0000 Message-ID: <20010207150439.13926.qmail@apache.org> From: dug@apache.org To: xml-axis-cvs@apache.org Subject: cvs commit: xml-axis/java/src/org/apache/axis/handlers SimpleAuthenticationHandler.java SimpleAuthorizationHandler.java dug 01/02/07 07:04:38 Modified: java/src/org/apache/axis/handlers SimpleAuthenticationHandler.java SimpleAuthorizationHandler.java Log: Allow everyone in if the *lst files aren't there - to make things easier. Revision Changes Path 1.2 +8 -4 xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java Index: SimpleAuthenticationHandler.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SimpleAuthenticationHandler.java 2001/02/06 19:51:43 1.1 +++ SimpleAuthenticationHandler.java 2001/02/07 15:04:38 1.2 @@ -89,15 +89,17 @@ String passwd = (String) msgContext.getProperty( Constants.MC_PASSWORD ); Debug.Print( 1, "User: " + userID ); Debug.Print( 2, "Pass: " + passwd ); - if ( userID == null || userID.equals("") ) - throw new AxisFault( "Server.Unauthorized", - "User not authorized", - null, null ); FileReader fr = new FileReader( "users.lst" ); LineNumberReader lnr = new LineNumberReader( fr ); String line = null ; boolean done = false ; + + if ( userID == null || userID.equals("") ) + throw new AxisFault( "Server.Unauthorized", + "User not authorized", + null, null ); + while ( (line = lnr.readLine()) != null ) { StringTokenizer st = new StringTokenizer( line ); String u = null , @@ -124,6 +126,8 @@ } catch( Exception e ) { Debug.Print( 1, e ); + // If no file - just allow everyone! + if ( e instanceof FileNotFoundException ) return ; if ( !(e instanceof AxisFault) ) e = new AxisFault(e); throw (AxisFault) e ; } 1.3 +7 -4 xml-axis/java/src/org/apache/axis/handlers/SimpleAuthorizationHandler.java Index: SimpleAuthorizationHandler.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/SimpleAuthorizationHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SimpleAuthorizationHandler.java 2001/02/07 13:52:05 1.2 +++ SimpleAuthorizationHandler.java 2001/02/07 15:04:38 1.3 @@ -92,15 +92,16 @@ Debug.Print( 1, "User: " + userID ); Debug.Print( 1, "Action: " + action ); + FileReader fr = new FileReader( "perms.lst" ); + LineNumberReader lnr = new LineNumberReader( fr ); + String line = null ; + boolean done = false ; + if ( userID == null || userID.equals("") ) throw new AxisFault( "Server.Unauthorized", "User not authorized", null, null ); - FileReader fr = new FileReader( "perms.lst" ); - LineNumberReader lnr = new LineNumberReader( fr ); - String line = null ; - boolean done = false ; while ( (line = lnr.readLine()) != null ) { StringTokenizer st = new StringTokenizer( line ); String u = null , @@ -126,6 +127,8 @@ } catch( Exception e ) { Debug.Print( 1, e ); + // If no file - just allow everyone! + if ( e instanceof FileNotFoundException ) return ; if ( !(e instanceof AxisFault) ) e = new AxisFault(e); throw (AxisFault) e ; }