Skip to content

Fix NPE in SCIM PATCH when request body contains "schemas": null - #51412

Merged
pedroigor merged 1 commit into
keycloak:mainfrom
sguilhen:51156-scim-null-schema
Aug 4, 2026
Merged

Fix NPE in SCIM PATCH when request body contains "schemas": null#51412
pedroigor merged 1 commit into
keycloak:mainfrom
sguilhen:51156-scim-null-schema

Conversation

@sguilhen

@sguilhen sguilhen commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Closes #51156

Closes keycloak#51156

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
@sguilhen
sguilhen requested a review from a team as a code owner August 4, 2026 01:34
Copilot AI review requested due to automatic review settings August 4, 2026 01:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents SCIM PATCH requests with "schemas": null from causing an HTTP 500 error.

Changes:

  • Normalizes null PATCH schemas to an empty set.
  • Adds an integration test verifying an HTTP 400 response.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scim/core/src/main/java/org/keycloak/scim/protocol/request/PatchRequest.java Handles null schema sets safely.
scim/tests/base/src/test/java/org/keycloak/tests/scim/tck/UserTest.java Tests PATCH requests containing null schemas.

@pedroigor
pedroigor merged commit bce3153 into keycloak:main Aug 4, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCIM PATCH NPE when request body contains "schemas": null

3 participants