mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-25 16:42:34 +00:00
Avoid a NullPointerException when client roles are associated with a client that no longer exists (#35489)
Closes #34444
Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
(cherry picked from commit 8f417d6318)
Co-authored-by: Marek Posolda <mposolda@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7a76858fe4
commit
4e13c0bbd3
@@ -122,6 +122,9 @@ public class RoleResolveUtil {
|
||||
|
||||
} else {
|
||||
ClientModel app = (ClientModel) role.getContainer();
|
||||
if (app == null) {
|
||||
return;
|
||||
}
|
||||
access = token.getResourceAccess(app.getClientId());
|
||||
if (access == null) {
|
||||
access = token.addAccess(app.getClientId());
|
||||
|
||||
Reference in New Issue
Block a user