From eba8dac47d80949806fa89ec640aa918fc6b4a18 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 5 Jul 2017 09:08:13 +0200 Subject: [PATCH] KEYCLOAK-4536 Add test to check behavior with file redirect URI (#4291) --- .../keycloak/testsuite/oauth/OAuthRedirectUriTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/oauth/OAuthRedirectUriTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/oauth/OAuthRedirectUriTest.java index c0c8601614..6f4e394a55 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/oauth/OAuthRedirectUriTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/oauth/OAuthRedirectUriTest.java @@ -142,6 +142,14 @@ public class OAuthRedirectUriTest extends AbstractKeycloakTest { Assert.assertEquals("Invalid parameter: redirect_uri", errorPage.getError()); } + @Test + public void testFileUri() throws IOException { + oauth.redirectUri("file://test"); + oauth.openLoginForm(); + Assert.assertTrue(errorPage.isCurrent()); + Assert.assertEquals("Invalid parameter: redirect_uri", errorPage.getError()); + } + @Test public void testNoParamMultipleValidUris() throws IOException { ClientManager.realm(adminClient.realm("test")).clientId("test-app").addRedirectUris("http://localhost:8180/app2");