[cpp-sp] branch main updated: Adjust passive error handling.
Codeberg
noreply at shibboleth.net
Tue Apr 28 17:39:58 UTC 2026
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/b207b23955e2f1768a95bd85f419ee4c6c471096
The following commit(s) were added to refs/heads/main by this push:
new b207b239 Adjust passive error handling.
b207b239 is described below
commit b207b23955e2f1768a95bd85f419ee4c6c471096
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Tue Apr 28 13:39:44 2026 -0400
Adjust passive error handling.
---
shibsp/handler/impl/TokenConsumer.cpp | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/shibsp/handler/impl/TokenConsumer.cpp b/shibsp/handler/impl/TokenConsumer.cpp
index 50d2cf06..46071687 100644
--- a/shibsp/handler/impl/TokenConsumer.cpp
+++ b/shibsp/handler/impl/TokenConsumer.cpp
@@ -127,6 +127,10 @@ pair<bool,long> TokenConsumer::run(SPRequest& request, bool isHandler) const
OperationException ex(string("Remote operation (token-consumer) failed with event: ") + event);
ex.addProperty(AgentException::EVENT_PROP_NAME, event);
ex.addProperty("operation", input.name());
+ const char* original_event = output.getmember("original_event").string();
+ if (original_event) {
+ ex.addProperty("original_event", original_event);
+ }
const char* target = output.getmember("target").string();
if (target) {
ex.addProperty(AgentException::TARGET_PROP_NAME, target);
@@ -210,10 +214,13 @@ pair<bool,long> TokenConsumer::run(SPRequest& request, bool isHandler) const
// passive case, because passive SSO doesn't make any sense together with POST recovery.
// Passive implies requireSession is off, and POST recovery implies it's on.
- const char* event = agent_ex ? agent_ex->getProperty(AgentException::EVENT_PROP_NAME) : nullptr;
+ const char* event = agent_ex ? agent_ex->getProperty(AgentException::EVENT_PROP_NAME) : nullptr;
if (event && !strcmp(event, "NoPassive")) {
+ const char* original = agent_ex->getProperty("original_event");
+ if (original) {
+ request.warn("Passive request resulted in error: %s", original);
+ }
const char* error_target = target.empty() ? agent_ex->getProperty(AgentException::TARGET_PROP_NAME) : target.c_str();
-
if (error_target) {
agent_ex->log(request, Priority::SHIB_WARN);
request.limitRedirect(error_target);
@@ -221,7 +228,7 @@ pair<bool,long> TokenConsumer::run(SPRequest& request, bool isHandler) const
if (boost::starts_with(error_target, request.getRequestURL())) {
request.warn("TokenConsumer target location matched handler, not trapping passive request error");
} else {
- request.info("trapping TokenConsumer failure and returning to target location for passive request");
+ request.info("trapping TokenConsumer failure and returning to target location of passive request");
return make_pair(true, request.sendRedirect(error_target));
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list