[cpp-sp COMMIT] /branches/REL_2/shibsp/ServiceProvider.cpp

noreply at shibboleth.net noreply at shibboleth.net
Mon Jul 30 21:09:48 EDT 2012


Author: scantor
Date: Mon Jul 30 21:09:48 2012
New Revision: 3739

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3739&view=rev
Log:
Better error handling when session initiator abstains

Modified:
    branches/REL_2/shibsp/ServiceProvider.cpp

Modified: branches/REL_2/shibsp/ServiceProvider.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/ServiceProvider.cpp?rev=3739&r1=3738&r2=3739&view=diff
==============================================================================
--- branches/REL_2/shibsp/ServiceProvider.cpp (original)
+++ branches/REL_2/shibsp/ServiceProvider.cpp Mon Jul 30 21:09:48 2012
@@ -339,7 +339,12 @@
                     throw ConfigurationException("No default session initiator found, check configuration.");
             }
 
-            return initiator->run(request, false);
+            // Dispatch to SessionInitiator. This MUST handle the request, or we want to fail here.
+            // Used to fall through into doExport, but this is a cleaner exit path.
+            pair<bool,long> ret = initiator->run(request, false);
+            if (ret.first)
+                return ret;
+            throw ConfigurationException("Session initiator did not handle request for a new session, check configuration.");
         }
 
         request.setAuthType(authType.second);



More information about the commits mailing list