Fixed a bug that was causing innocuous error messages during ARP matching for anonymo...
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 26 Apr 2004 17:39:16 +0000 (17:39 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 26 Apr 2004 17:39:16 +0000 (17:39 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1015 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/arp/Rule.java

index 2d4597c..978ee71 100755 (executable)
@@ -227,15 +227,26 @@ public class Rule {
                if (target.matchesAny()) {
                        return true;
                }
+               
+               if (requester == null) {
+                       return false;
+               }
+               
                try {
                        MatchFunction requesterFunction =
                                ArpEngine.lookupMatchFunction(target.getRequester().getMatchFunctionIdentifier());
                        if (!requesterFunction.match(target.getRequester().getValue(), requester)) {
                                return false;
                        }
+                       
                        if (target.getResource().matchesAny()) {
                                return true;
                        }
+                       
+                       if (resource == null) {
+                               return false;
+                       }
+                       
                        MatchFunction resourceFunction =
                                ArpEngine.lookupMatchFunction(target.getResource().getMatchFunctionIdentifier());
                        if (resourceFunction.match(target.getResource().getValue(), resource)) {