Fix attribute query profile handlers such that exceptions that occur during attribute...
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 21 Dec 2010 16:01:41 +0000 (16:01 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 21 Dec 2010 16:01:41 +0000 (16:01 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2971 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

doc/RELEASE-NOTES.txt
src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml1/AttributeQueryProfileHandler.java
src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml2/AttributeQueryProfileHandler.java

index 1187804..04ece02 100644 (file)
@@ -10,6 +10,7 @@ Changes in Release 2.2.1
 [SIDP-432] - Set explicit caching headers on redirects
 [SIDP-436] - Null AuthnContextClassRef causes NPE
 [SIDP-447] - Fix for SIDP-417 missed RemoteUserLoginHandler
+[SIDP-450] - NPE with AttributeQueryProfile when there are errors resolving attributes
 
 Changes in Release 2.2.0
 =============================================
index 9c3a991..9e0340d 100644 (file)
@@ -100,12 +100,12 @@ public class AttributeQueryProfileHandler extends AbstractSAML1ProfileHandler {
                 }
 
                 resolveAttributes(requestContext);
-                requestContext.setReleasedAttributes(requestContext.getAttributes().keySet());
 
                 ArrayList<Statement> statements = new ArrayList<Statement>();
                 AttributeStatement attributeStatement = buildAttributeStatement(requestContext,
                         "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches");
                 if (attributeStatement != null) {
+                    requestContext.setReleasedAttributes(requestContext.getAttributes().keySet());
                     statements.add(attributeStatement);
                 }
 
index 7858178..828939b 100644 (file)
@@ -113,12 +113,12 @@ public class AttributeQueryProfileHandler extends AbstractSAML2ProfileHandler {
                 }
 
                 resolveAttributes(requestContext);
-                requestContext.setReleasedAttributes(requestContext.getAttributes().keySet());
 
                 // Lookup principal name and attributes, create attribute statement from information
                 ArrayList<Statement> statements = new ArrayList<Statement>();
                 AttributeStatement attributeStatement = buildAttributeStatement(requestContext);
                 if (attributeStatement != null) {
+                    requestContext.setReleasedAttributes(requestContext.getAttributes().keySet());
                     statements.add(attributeStatement);
                 }