Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the null pointer in operations json list. #405

Closed
wants to merge 2 commits into from

Conversation

Malith-19
Copy link

@Malith-19 Malith-19 commented Jun 28, 2024

Purpose

Fix wso2/product-is#19409

This issue occures, when a invalid operation schema field given since it only accepts Operations` field. Once json schema not contains this filed correctly it will create a null pointer and raise an error in a for loop used to iterate that operation list.

Goals

Handle the internal error in PATCH scim2/v2/roles/{id} API.

Approach

  • Check weather operation list is null first.
  • If yes, then it checks json schema contains operations field and throws an bad request error error with invalid json schema.
  • If operation list is null and still not has operations throws an bad request error with default error description.

Security checks

Samples

image

Related PRs

wso2/docs-is#4395

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Malith-19 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Malith-19 Malith-19 self-assigned this Jun 28, 2024
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/9723735849

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/9723735849
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/9723735849

@Malith-19 Malith-19 closed this Jul 1, 2024
@Malith-19 Malith-19 deleted the scim-#19409 branch July 1, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SCIM API returns 500 for invalid request body
3 participants