Fall back to default error handling if application lookup itself fails.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 20 Jan 2009 23:41:27 +0000 (23:41 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 20 Jan 2009 23:41:27 +0000 (23:41 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@2932 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/ServiceProvider.cpp

index b64d8ee..0d31923 100644 (file)
@@ -55,7 +55,12 @@ namespace shibsp {
         bool mderror = dynamic_cast<const opensaml::saml2md::MetadataException*>(tp.getRichException())!=NULL;
         pair<bool,const char*> redirectErrors = pair<bool,const char*>(false,NULL);
         pair<bool,const char*> pathname = pair<bool,const char*>(false,NULL);
-        const PropertySet* props=app ? app->getPropertySet("Errors") : NULL;
+
+        // Strictly for error handling, detect a NULL application and point at the default.
+        if (!app)
+            app = request.getServiceProvider().getApplication("default");
+
+        const PropertySet* props=app->getPropertySet("Errors");
 
         try {
             RequestMapper::Settings settings = request.getRequestSettings();