[java-plugin-shibd-saml] branch main updated: Adjust order of resource processing in logout response action.

Codeberg noreply at shibboleth.net
Mon Jun 8 18:37:35 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-plugin-shibd-saml.

View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd-saml/commit/a8f89db36e5932ebe53bf1aa96bbe6e5b56c2bff

The following commit(s) were added to refs/heads/main by this push:
     new a8f89db  Adjust order of resource processing in logout response action.
a8f89db is described below

commit a8f89db36e5932ebe53bf1aa96bbe6e5b56c2bff
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Jun 8 14:37:13 2026 -0400

    Adjust order of resource processing in logout response action.
---
 .../saml2/profile/impl/ProcessLogoutResponse.java  | 40 +++++++++++-----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java
index 4670ee0..8632554 100644
--- a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java
@@ -167,31 +167,31 @@ public class ProcessLogoutResponse extends AbstractApplicationAction {
                 output.addmember(STATUS_PARAM).integer(-1);
             }
         }
-        
-        final RemotedHttpServletResponse remotedResponse = ensureAgentRequestContext().getRemotedHttpServletResponse();
-        assert remotedResponse != null;
-        
-        if (!remotedResponse.isCommitted()) {
-            // Issue redirect to resource URL. Either recovered from protocol state earlier
-            // or falling back to an input parameter from the agent. Final backstop is a relative
-            // redirect to the site root.
-                        
-            byte[] resource = stateData != null ? stateData.getRawResource() : null;
+
+        // Issue redirect to resource URL. Either recovered from protocol state earlier
+        // or falling back to an input parameter from the agent. Final backstop is a relative
+        // redirect to the site root.
+                    
+        byte[] resource = stateData != null ? stateData.getRawResource() : null;
+        if (resource == null || resource.length == 0) {
+            final DDF in = ensureAgentRequestContext().getInput();
+            if (in != null) {
+                resource = in.getmember(ConsumerConstants.HOME_URL).unsafe_string();
+            }
             if (resource == null || resource.length == 0) {
-                final DDF in = ensureAgentRequestContext().getInput();
-                if (in != null) {
-                    resource = in.getmember(ConsumerConstants.HOME_URL).unsafe_string();
-                }
-                if (resource == null || resource.length == 0) {
-                    resource = "/".getBytes(StandardCharsets.UTF_8);
-                }
+                resource = "/".getBytes(StandardCharsets.UTF_8);
             }
-            
-            output.addmember(SPConstants.TARGET).unsafe_string(resource);
-            remotedResponse.sendRedirect(resource);
         }
         
+        output.addmember(SPConstants.TARGET).unsafe_string(resource);
         
+        final RemotedHttpServletResponse remotedResponse = ensureAgentRequestContext().getRemotedHttpServletResponse();
+        assert remotedResponse != null;
+        if (remotedResponse.isCommitted()) {
+            log.error("{} Servlet response already committed?", getLogPrefix());
+        } else {
+            remotedResponse.sendRedirect(resource);
+        }
     }
         
 }
\ No newline at end of file

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


More information about the commits mailing list