Fix SIDP-261
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 30 Jun 2009 12:33:58 +0000 (12:33 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 30 Jun 2009 12:33:58 +0000 (12:33 +0000)
Update JCE lib version

git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2852 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

doc/RELEASE-NOTES.txt
pom.xml
src/main/java/edu/internet2/middleware/shibboleth/idp/authn/provider/IPAddressLoginHandler.java

index 9a3c012..943912d 100644 (file)
@@ -2,6 +2,7 @@ Changes in Release 2.1.3
 =============================================
 [SIDP-247] - Log Exception in UP LoginHandler Servlet
 [SIDP-263] - Suggest adding defaultSigningCredentialRef to the AnonymousRelyingParty element in the default config
+[SIDP-261] - IPAddressLoginHandler addresses comparasion fails
 [SIDP-276] - Example RDB Connector, quote principal
 [SIDP-277] - Incorrect null check for request context in UsernamePasswordServlet
 [SIDP-279] - IdP should log NameID for auditing
diff --git a/pom.xml b/pom.xml
index d2b1345..61e27b4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <dependency>
             <groupId>edu.internet2.middleware</groupId>
             <artifactId>shibboleth-jce</artifactId>
-            <version>1.0.0</version>
+            <version>1.1.0</version>
             <scope>runtime</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>catalina</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         
         <!-- Test dependencies -->
index 5936a6e..7323d58 100644 (file)
@@ -246,7 +246,15 @@ public class IPAddressLoginHandler extends AbstractLoginHandler {
             networkAddress = byteArrayToBitSet(tempAddr.getAddress());
 
             int masklen = Integer.parseInt(netmaskString);
-            int addrlen = networkAddress.length();
+
+            int addrlen;
+            if (tempAddr instanceof Inet4Address) {
+                addrlen = 32;
+            } else if (tempAddr instanceof Inet6Address) {
+                addrlen = 128;
+            }else{
+                throw new UnknownHostException("Unable to determine Inet protocol version");
+            }
 
             // ensure that the netmask isn't too large
             if ((tempAddr instanceof Inet4Address) && (masklen > 32)) {