Invalid parameter redirect_uri when using an invalid client_id (#19731)

closes #19662
This commit is contained in:
Marek Posolda 2023-04-17 15:12:59 +02:00 committed by GitHub
parent e5d4f43fe0
commit 8d01109158
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -255,7 +255,7 @@ public class AuthorizationEndpoint extends AuthorizationEndpointBase {
client = realm.getClientByClientId(clientId);
if (client == null) {
event.error(Errors.CLIENT_NOT_FOUND);
throw new ErrorPageException(session, authenticationSession, Response.Status.BAD_REQUEST, Messages.INVALID_PARAMETER, OIDCLoginProtocol.REDIRECT_URI_PARAM);
throw new ErrorPageException(session, authenticationSession, Response.Status.BAD_REQUEST, Messages.CLIENT_NOT_FOUND);
}
if (!client.isEnabled()) {

View file

@ -184,7 +184,7 @@ public class UncaughtErrorPageTest extends AbstractKeycloakTest {
oauth.openLoginForm();
assertTrue(errorPage.isCurrent());
assertEquals("Invalid parameter: redirect_uri", errorPage.getError());
assertEquals("Client not found.", errorPage.getError());
}
@Test