Fix SIDP-85; SAML 1 endpoint would have exhibited the same problem
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / idp / profile / saml1 / 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);