Possible client enumeration in the authorization endpoint

Closes #12164
This commit is contained in:
Pedro Hos 2022-07-26 04:10:06 -03:00 committed by GitHub
parent eb1f31e9dd
commit ee2c5391bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -230,7 +230,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.CLIENT_NOT_FOUND);
throw new ErrorPageException(session, authenticationSession, Response.Status.BAD_REQUEST, Messages.INVALID_PARAMETER, OIDCLoginProtocol.REDIRECT_URI_PARAM);
}
if (!client.isEnabled()) {

View file

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