[java-identity-provider] branch main updated: IDP-2399 - Unit test needs to account for form encoding.
Scott Cantor
cantor.2 at osu.edu
Tue Aug 19 16:18: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-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=c2b0007068c26b20e1e0d20099b989a549ccab0c
The following commit(s) were added to refs/heads/main by this push:
new c2b000706 IDP-2399 - Unit test needs to account for form encoding.
c2b000706 is described below
commit c2b0007068c26b20e1e0d20099b989a549ccab0c
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 c0a976809..75b205069 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;
@@ -236,7 +237,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