[java-identity-provider] branch maint-5.1 updated: IDP-2399 - Unit test needs to account for form encoding.

Scott Cantor cantor.2 at osu.edu
Tue Aug 19 16:18:53 UTC 2025


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

scantor pushed a commit to branch maint-5.1
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=57aad9d0e03dc1816c84a7f53a9b96a718b445bc

The following commit(s) were added to refs/heads/maint-5.1 by this push:
     new 57aad9d0e IDP-2399 - Unit test needs to account for form encoding.
57aad9d0e is described below

commit 57aad9d0e03dc1816c84a7f53a9b96a718b445bc
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Aug 19 12:18:23 2025 -0400

    IDP-2399 - Unit test needs to account for form encoding.
---
 .../src/test/java/net/shibboleth/idp/test/flows/cas/LoginFlowTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/idp-conf-impl/src/test/java/net/shibboleth/idp/test/flows/cas/LoginFlowTest.java b/idp-conf-impl/src/test/java/net/shibboleth/idp/test/flows/cas/LoginFlowTest.java
index 53e3ecac4..931872d0c 100644
--- a/idp-conf-impl/src/test/java/net/shibboleth/idp/test/flows/cas/LoginFlowTest.java
+++ b/idp-conf-impl/src/test/java/net/shibboleth/idp/test/flows/cas/LoginFlowTest.java
@@ -56,6 +56,7 @@ import net.shibboleth.profile.context.RelyingPartyContext;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfigurationResolver;
 import net.shibboleth.profile.relyingparty.VerifiedProfileCriterion;
+import net.shibboleth.shared.codec.HTMLEncoder;
 import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.net.URISupport;
 import net.shibboleth.shared.resolver.CriteriaSet;
@@ -180,7 +181,7 @@ public class LoginFlowTest extends AbstractFlowTest {
         assertEquals(outcome.getId(), "PostBackToService");
         final MockHttpServletResponse mockResponse = (MockHttpServletResponse) externalContext.getNativeResponse();
         final String body = mockResponse.getContentAsString();
-        assertTrue(body.contains(String.format("<form action=\"%s\" method=\"post\">", service)));
+        assertTrue(body.contains(String.format("<form action=\"%s\" method=\"post\">", HTMLEncoder.encodeForHTMLAttribute(service))));
         assertTrue(body.contains("<input type=\"hidden\" name=\"ticket\" value=\"ST-"));
         final Matcher matcher = Pattern.compile("value=\"([^\"]+)").matcher(body);
         assertTrue(matcher.find());

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


More information about the commits mailing list