Fix SIDP-85; SAML 1 endpoint would have exhibited the same problem
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 15 Dec 2007 13:39:01 +0000 (13:39 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 15 Dec 2007 13:39:01 +0000 (13:39 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2499 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AttributeQueryProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AttributeQueryProfileHandler.java

index 713ec62..27fe945 100644 (file)
@@ -163,7 +163,9 @@ public class AttributeQueryProfileHandler extends AbstractSAML1ProfileHandler {
                 throw new ProfileException("Unable to decode message.");
             }
             AttributeQuery query = request.getAttributeQuery();
-            requestContext.setSubjectNameIdentifier(query.getSubject().getNameIdentifier());
+            if(query != null){
+                requestContext.setSubjectNameIdentifier(query.getSubject().getNameIdentifier());
+            }
 
             String relyingPartyId = requestContext.getInboundMessageIssuer();
             RelyingPartyConfiguration rpConfig = getRelyingPartyConfiguration(relyingPartyId);
index 6fe99bc..346284e 100644 (file)
@@ -158,8 +158,10 @@ public class AttributeQueryProfileHandler extends AbstractSAML2ProfileHandler {
         } finally {
             // Set as much information as can be retrieved from the decoded message
             AttributeQuery query = requestContext.getInboundSAMLMessage();
-            requestContext.setSubjectNameIdentifier(query.getSubject().getNameID());
-
+            if(query != null){
+                requestContext.setSubjectNameIdentifier(query.getSubject().getNameID());
+            }
+            
             String relyingPartyId = requestContext.getInboundMessageIssuer();
             RelyingPartyConfiguration rpConfig = getRelyingPartyConfiguration(relyingPartyId);
             if (rpConfig == null) {