[java-plugin-shibd-saml] branch main updated: Switch request body to unsfe_string.

Scott Cantor cantor.2 at osu.edu
Tue Feb 4 19:07:26 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-saml.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd-saml.git;a=commit;h=907df7728656e61e15395578c6f99f9dbec5eabb

The following commit(s) were added to refs/heads/main by this push:
     new 907df77  Switch request body to unsfe_string.
907df77 is described below

commit 907df7728656e61e15395578c6f99f9dbec5eabb
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 4 14:07:24 2025 -0500

    Switch request body to unsfe_string.
---
 .../sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java        | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
index 11c933e..3bf36e2 100644
--- a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
+++ b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
@@ -63,6 +63,8 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import com.google.common.base.Charsets;
+
 import net.shibboleth.idp.authn.AuthnEventIds;
 import net.shibboleth.idp.profile.IdPEventIds;
 import net.shibboleth.shared.codec.Base64Support;
@@ -70,6 +72,7 @@ import net.shibboleth.shared.codec.DecodingException;
 import net.shibboleth.shared.codec.EncodingException;
 import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.collection.Pair;
+import net.shibboleth.shared.logic.Constraint;
 import net.shibboleth.shared.net.URISupport;
 import net.shibboleth.shared.security.IdentifierGenerationStrategy;
 import net.shibboleth.shared.xml.XMLParserException;
@@ -668,11 +671,8 @@ public class SAML2TokenConsumerFlowTest extends AbstractSPFlowTest {
             http.addmember(RemotedHttpServletRequest.CONTENT_TYPE).string("application/x-www-form-urlencoded");
             http.addmember(RemotedHttpServletRequest.REQUEST_URL).unsafe_string(RESPONSE_URL.getBytes(StandardCharsets.UTF_8));
             
-            http.addmember(RemotedHttpServletRequest.BODY).string(URISupport.buildQuery(
-                    CollectionSupport.listOf(
-                            new Pair<>("SAMLResponse", base64))
-                        )
-                    );
+            http.addmember(RemotedHttpServletRequest.BODY).unsafe_string(Constraint.isNotNull(URISupport.buildQuery(
+                    CollectionSupport.listOf(new Pair<>("SAMLResponse", base64))), "Query string is null").getBytes(Charsets.UTF_8));
             
             return obj;
         } catch (final MarshallingException | EncodingException e) {

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


More information about the commits mailing list