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

Codeberg noreply at shibboleth.net
Sun Nov 29 09:17:49 UTC 2026


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

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

View the commit online:
https://codeberg.org/Shibboleth/java-idp-oidc/commit/88c33046621fb8d673c44fda002a9b0b8316fdfc

The following commit(s) were added to refs/heads/main by this push:
     new 88c33046 Improve registration flow tests to cover forbidden schemes.
88c33046 is described below

commit 88c33046621fb8d673c44fda002a9b0b8316fdfc
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 e1214c3e..0513669b 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
@@ -138,6 +138,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