[java-idp-oidc] branch maint-4.4 updated: Improve registration flow tests to cover forbidden schemes.

Codeberg noreply at shibboleth.net
Sun Nov 29 09:21:32 UTC 2026


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

codeberg pushed a commit to branch maint-4.4
in repository java-idp-oidc.

View the commit online:
https://codeberg.org/Shibboleth/java-idp-oidc/commit/047ae44a484b730266934a29c00fb45ea3eddebe

The following commit(s) were added to refs/heads/maint-4.4 by this push:
     new 047ae44a Improve registration flow tests to cover forbidden schemes.
047ae44a is described below

commit 047ae44a484b730266934a29c00fb45ea3eddebe
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Sun Nov 29 11:17:33 2026 +0200

    Improve registration flow tests to cover forbidden schemes.
---
 .../oidc/op/profile/flow/RegistrationFlowTest.java  | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RegistrationFlowTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RegistrationFlowTest.java
index 947bd26d..50495b08 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RegistrationFlowTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RegistrationFlowTest.java
@@ -145,6 +145,27 @@ public class RegistrationFlowTest extends AbstractOidcFlowTest {
         Assert.assertTrue(registeredScope.equals(Scope.parse("openid profile email address phone offline_access")));
     }
 
+    @Test
+    public void testUnauthenticated_javascriptSchemeRejected() throws Exception {
+        setJsonRequest("POST", "{ \"redirect_uris\":[\"javascript:alert(1)//\"], \"application_type\":\"native\" }");
+        final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
+        assertErrorCode(result, "invalid_client_metadata");
+    }
+
+    @Test
+    public void testUnauthenticated_dataSchemeRejected() throws Exception {
+        setJsonRequest("POST", "{ \"redirect_uris\":[\"data:text/html\"], \"application_type\":\"native\" }");
+        final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
+        assertErrorCode(result, "invalid_client_metadata");
+    }
+
+    @Test
+    public void testUnauthenticated_dataContentRejected() throws Exception {
+        setJsonRequest("POST", "{ \"redirect_uris\":[\"data:text/html,<script>alert(1)</script>\"], \"application_type\":\"native\" }");
+        final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
+        assertErrorCode(result, "invalid_client_metadata");
+    }
+
     @Test
     public void testUnauthenticated_success_customScope() throws Exception {
         final String scope = "openid profile";

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


More information about the commits mailing list