Skip to content

NPE thrown in whoami endpoint #33907

@antikalk

Description

@antikalk

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

admin/ui

Describe the bug

When accessing the admin console with a selected realm that doesn't exist, the whoami endpoint returns a 500 Internal Server Error. There is an NPE thrown here:

getRealmAdminAccess(realm, realm.getMasterAdminClient(), user, realmAdminAccess);
because realm is null.

I did not yet test this with the latest release, but by having a look at the code in main the issue could still be there.

Version

25.0.5

Regression

  • The issue is a regression

Expected behavior

Something meaningful is returned

Actual behavior

500 is returned due to NPE

How to Reproduce?

Access admin console with /admin/master/console/#/nonExistingRealm.

Anything else?

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions