Allow no attribute reply
authorgilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 29 Mar 2005 02:47:28 +0000 (02:47 +0000)
committergilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 29 Mar 2005 02:47:28 +0000 (02:47 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1344 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/serviceprovider/SessionManager.java

index 905059f..7036016 100644 (file)
@@ -74,7 +74,7 @@ public class SessionManager {
            do {
                rand.nextBytes(trash);
                for (int i=0;i<16;i++) {
-                   trash[i]|=0x3f;
+                   trash[i]&=0x3f;
                    ctrash[i]=(char)table.charAt(trash[i]);
                }
            } while (null!=sessions.get(ctrash));
@@ -292,6 +292,8 @@ public class SessionManager {
            Map /*<String,String>*/attributeMap = new HashMap/*<String,String>*/();
            StringBuffer sb = new StringBuffer();
         SAMLResponse attributeResponse = session.getAttributeResponse();
+               if (attributeResponse==null)
+                       return attributeMap;
         Iterator assertions = attributeResponse.getAssertions();
         while (assertions.hasNext()) {
             SAMLAssertion assertion = (SAMLAssertion) assertions.next();