Add relay state to exception only if non-empty
authorScott Cantor <cantor.2@osu.edu>
Thu, 29 Nov 2012 01:55:48 +0000 (01:55 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 29 Nov 2012 01:55:48 +0000 (01:55 +0000)
shibsp/handler/impl/AssertionConsumerService.cpp

index 901d826..881e887 100644 (file)
@@ -251,8 +251,10 @@ pair<bool,long> AssertionConsumerService::processMessage(
                 return make_pair(true, httpResponse.sendRedirect(relayState.c_str()));
             }
         }
-
-        ex.addProperty("RelayState", relayState.c_str());
+        
+        if (!relayState.empty()) {
+            ex.addProperty("RelayState", relayState.c_str());
+        }
 
         // Log the error.
         try {