[java-plugin-shibd] branch main updated: Move POST recovery prior to message encoding.
Scott Cantor
cantor.2 at osu.edu
Mon Oct 6 23:40:56 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-plugin-shibd.
View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd.git;a=commit;h=95e79eb138c515ff929594946829c7763c013e34
The following commit(s) were added to refs/heads/main by this push:
new 95e79eb Move POST recovery prior to message encoding.
95e79eb is described below
commit 95e79eb138c515ff929594946829c7763c013e34
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Oct 6 19:40:50 2025 -0400
Move POST recovery prior to message encoding.
---
.../initiator-beans.xml} | 5 -----
.../net/shibboleth/idp/flows/sp/initiator/initiator-flow.xml | 2 ++
.../idp/flows/sp/session-initiator/session-initiator-beans.xml | 8 --------
.../idp/flows/sp/session-initiator/session-initiator-flow.xml | 9 +--------
.../java/net/shibboleth/sp/profile/impl/RecoverPostData.java | 6 +++++-
5 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-beans.xml b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-beans.xml
similarity index 87%
copy from sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-beans.xml
copy to sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-beans.xml
index c5a1570..c3f6881 100644
--- a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-beans.xml
+++ b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-beans.xml
@@ -10,11 +10,6 @@
<bean id="shibboleth.sp.profileId" class="java.lang.String" c:_0="http://shibboleth.net/ns/profiles/sp/session-initiator" />
<bean id="shibboleth.sp.loggingId" class="java.lang.String" c:_0="%{sp.service.logging.initiator:SPAgent.SessionInitiator}" />
- <bean id="MapResourceToStateToken"
- class="net.shibboleth.sp.profile.impl.MapResourceToStateToken" scope="prototype"
- p:createOutputObjects="true"
- p:errorFatal="%{sp.stateToken.errorsFatal:false}" />
-
<bean id="PreservePostData"
class="net.shibboleth.sp.profile.impl.PreservePostData" scope="prototype"
p:errorFatal="%{sp.postData.errorsFatal:false}"
diff --git a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-flow.xml b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-flow.xml
index 3227a5b..61289f7 100644
--- a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-flow.xml
+++ b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-flow.xml
@@ -37,4 +37,6 @@
<transition on="RuntimeException" to="RuntimeException" />
</global-transitions>
+ <bean-import resource="classpath:/META-INF/net/shibboleth/idp/flows/sp/initiator/initiator-beans.xml" />
+
</flow>
diff --git a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-beans.xml b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-beans.xml
index c5a1570..6ce382b 100644
--- a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-beans.xml
+++ b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-beans.xml
@@ -15,12 +15,4 @@
p:createOutputObjects="true"
p:errorFatal="%{sp.stateToken.errorsFatal:false}" />
- <bean id="PreservePostData"
- class="net.shibboleth.sp.profile.impl.PreservePostData" scope="prototype"
- p:errorFatal="%{sp.postData.errorsFatal:false}"
- p:lifetime="%{sp.postData.lifetime:PT15M}"
- p:storageService-ref="#{'%{sp.postData.StorageService:shibboleth.StorageService}'.trim()}"
- p:cookieManager-ref="shibboleth.sp.RemotedCookieManager"
- p:cookiePrefix="#{'%{sp.postData.cookiePrefix:__Host-_shibsp_post_}'.trim()}" />
-
</beans>
diff --git a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-flow.xml b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-flow.xml
index 362b68e..9c8ea82 100644
--- a/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-flow.xml
+++ b/sp-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/session-initiator/session-initiator-flow.xml
@@ -29,17 +29,10 @@
<subflow-state id="CallInitiatorFlow" subflow="sp/initiator/#{SessionInitiatorIterator.next()}">
<input name="calledAsSubflow" value="true" />
- <transition on="proceed" to="PreservePostData" />
+ <transition on="proceed" to="EncodeAgentResponse" />
<transition on="ReselectFlow" to="CheckIterator" />
</subflow-state>
- <action-state id="PreservePostData">
- <evaluate expression="PreservePostData" />
- <evaluate expression="'proceed'" />
-
- <transition on="proceed" to="EncodeAgentResponse" />
- </action-state>
-
<action-state id="NoPotentialFlow">
<evaluate expression="'NoPotentialFlow'" />
</action-state>
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/RecoverPostData.java b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/RecoverPostData.java
index b0acad6..04c614e 100644
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/RecoverPostData.java
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/RecoverPostData.java
@@ -339,12 +339,16 @@ public class RecoverPostData extends AbstractApplicationAction {
final AgentRequestContext agentRequestContext = ensureAgentRequestContext();
final DDF input = agentRequestContext.getInput();
- final String stateToken = input != null ? input.getmember(SPConstants.STATE).string() : null;
+ String stateToken = input != null ? input.getmember(SPConstants.STATE).string() : null;
if (stateToken == null) {
log.debug("{} No state token found in request, skipping POST recovery check", getLogPrefix());
return null;
}
+ if (stateToken.length() > 16) {
+ stateToken = stateToken.substring(0, 16);
+ }
+
// Do the needful to allow cookies to be loaded/cleared from wrapped input.
try {
RemotedHttpServletRequestResponseContext.loadCurrent(agentRequestContext.getRemotedHttpServletRequest(),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list