Fix log typos
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 18 Dec 2007 10:26:57 +0000 (10:26 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 18 Dec 2007 10:26:57 +0000 (10:26 +0000)
Address SIDP - 105

git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2505 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 589ec5c..e35fb32 100644 (file)
@@ -144,15 +144,15 @@ public class AttributeQueryProfileHandler extends AbstractSAML1ProfileHandler {
             requestContext.setMessageDecoder(decoder);
             decoder.decode(requestContext);
             log.debug("Decoded request");
-            
-            if (!(requestContext.getInboundMessage() instanceof Request)) {
-                log.error("Incomming message was not a Request, it was a {}", requestContext.getInboundMessage()
-                        .getClass().getName());
-                requestContext
-                        .setFailureStatus(buildStatus(StatusCode.REQUESTER, null, "Invalid SAML Request message."));
-                throw new ProfileException("Invalid SAML Request message.");
+
+            Request request = requestContext.getInboundSAMLMessage();
+            if (request == null || !(request instanceof Request) || request.getAttributeQuery() == null) {
+                log.error("Incoming message was not an Attribute request");
+                requestContext.setFailureStatus(buildStatus(StatusCode.REQUESTER, null,
+                        "Invalid SAML Attribute Request message."));
+                throw new ProfileException("Invalid SAML Attribute Request message.");
             }
-            
+
             return requestContext;
         } catch (MessageDecodingException e) {
             log.error("Error decoding attribute query message", e);
index 9a6da96..6de59f6 100644 (file)
@@ -145,15 +145,15 @@ public class AttributeQueryProfileHandler extends AbstractSAML2ProfileHandler {
             requestContext.setMessageDecoder(decoder);
             decoder.decode(requestContext);
             log.debug("Decoded request");
-            
-            if (!(requestContext.getInboundMessage() instanceof AttributeQuery)) {
-                log.error("Incomming message was not a AttributeQuery, it was a {}", requestContext.getInboundMessage()
-                        .getClass().getName());
+
+            if (!(requestContext.getInboundSAMLMessage() instanceof AttributeQuery)) {
+                log.error("Incoming message was not a AttributeQuery, it was a {}", requestContext
+                        .getInboundSAMLMessage().getClass().getName());
                 requestContext.setFailureStatus(buildStatus(StatusCode.REQUESTER_URI, null,
                         "Invalid SAML AttributeQuery message."));
                 throw new ProfileException("Invalid SAML AttributeQuery message.");
             }
-            
+
             return requestContext;
         } catch (MessageDecodingException e) {
             log.error("Error decoding attribute query message", e);