Check for a null request, which seems to happen if you issue a GET.
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 21 Jun 2005 20:08:08 +0000 (20:08 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 21 Jun 2005 20:08:08 +0000 (20:08 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1658 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/provider/SAMLv1_AttributeQueryHandler.java

index c88e1a3..5e9959e 100644 (file)
@@ -125,7 +125,7 @@ public class SAMLv1_AttributeQueryHandler extends BaseServiceHandler implements
        public SAMLResponse processRequest(HttpServletRequest request, HttpServletResponse response,
                        SAMLRequest samlRequest, IdPProtocolSupport support) throws SAMLException, IOException, ServletException {
 
-               if (samlRequest.getQuery() == null || !(samlRequest.getQuery() instanceof SAMLAttributeQuery)) {
+               if (samlRequest == null || samlRequest.getQuery() == null || !(samlRequest.getQuery() instanceof SAMLAttributeQuery)) {
                        log.error("Protocol Handler can only respond to SAML Attribute Queries.");
                        throw new SAMLException("General error processing request.");
                }