Skip to content

Commit

Permalink
Add back validation
Browse files Browse the repository at this point in the history
  • Loading branch information
collinpreston committed Nov 14, 2023
1 parent b5bac7b commit 5c15a64
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.keycloak.services.resources.LoginActionsService;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -36,6 +37,11 @@ public void authenticate(AuthenticationFlowContext context) {
uriBuilder.queryParam(LoginActionsService.SESSION_CODE, accessCode);
}
URI baseUriWithCodeAndClientId = uriBuilder.build();
try {
new URI(baseUriWithCodeAndClientId.getPath());
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
form.setAttribute("unlinkedProviders", new IdentityProviderBean(realm, session, realmIdentityProvidersList, baseUriWithCodeAndClientId));
}
super.authenticate(context);
Expand Down

0 comments on commit 5c15a64

Please sign in to comment.