[cpp-sp] branch main updated: Fix exception logging in handleError.

Codeberg noreply at shibboleth.net
Thu Dec 4 21:56:48 UTC 2025


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository cpp-sp.

View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/7598b589a10b95e712dd9514ec871d14c28e2377

The following commit(s) were added to refs/heads/main by this push:
     new 7598b589 Fix exception logging in handleError.
7598b589 is described below

commit 7598b589a10b95e712dd9514ec871d14c28e2377
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Dec 4 16:56:37 2025 -0500

    Fix exception logging in handleError.
---
 shibsp/Agent.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/shibsp/Agent.cpp b/shibsp/Agent.cpp
index 407474f5..91711137 100644
--- a/shibsp/Agent.cpp
+++ b/shibsp/Agent.cpp
@@ -73,19 +73,15 @@ long Agent::handleError(Category& log, SPRequest& request, const Session* sessio
     const char* redirectErrors = nullptr;
 
     AgentException* richEx = dynamic_cast<AgentException*>(ex);
-
     if (richEx) {
         // Populate target if needed.
         if (!richEx->getProperty("target")) {
             richEx->addProperty("target", request.getRequestURL());
         }
-
-        if (richEx) {
-            richEx->log(request);
-        }
-        else {
-            request.error(ex->what());
-        }
+        richEx->log(request);
+    }
+    else if (ex) {
+        request.error(ex->what());
     }
 
     // Now look for settings in the request map.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list