[java-idp-oidc] branch main updated: Improve unit tests to cover forbidden schemes in registration.
Codeberg
noreply at shibboleth.net
Sun Nov 29 09:32: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/5dc1173736e4fea8afcfcc47274fdcb19ebb2e2c
The following commit(s) were added to refs/heads/main by this push:
new 5dc11737 Improve unit tests to cover forbidden schemes in registration.
5dc11737 is described below
commit 5dc1173736e4fea8afcfcc47274fdcb19ebb2e2c
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Sun Nov 29 11:32:39 2026 +0200
Improve unit tests to cover forbidden schemes in registration.
---
.../idp/plugin/oidc/op/profile/impl/CheckRedirectUrisTest.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckRedirectUrisTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckRedirectUrisTest.java
index 372332e0..07f647ee 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckRedirectUrisTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/CheckRedirectUrisTest.java
@@ -221,6 +221,15 @@ public class CheckRedirectUrisTest extends BaseOIDCRegistrationRequestTest {
assertEvent(EventIds.INVALID_MESSAGE, metadata, URI.create("custom.test:test"));
}
+ @Test
+ public void testNimbusRejectsForbiddenRedirectSchemes() {
+ final OIDCClientMetadata metadata = new OIDCClientMetadata();
+ Assert.expectThrows(IllegalArgumentException.class,
+ () -> metadata.setRedirectionURIs(Set.of(URI.create("javascript:alert(1)//"))));
+ Assert.expectThrows(IllegalArgumentException.class,
+ () -> metadata.setRedirectionURIs(Set.of(URI.create("data:text/html"))));
+ }
+
protected void initializeActionWithClient(@Nonnull final HttpClient httpClient) throws ComponentInitializationException {
action = new CheckRedirectURIs();
action.setHttpClient(httpClient);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list