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

Fixed empty value object issue inside v2 role patch operation #395

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

PasinduYeshan
Copy link
Contributor

@PasinduYeshan PasinduYeshan commented Oct 26, 2023

This PR addresses an issue in the current API implementation where a PATCH request with an empty "value" object within the "Operations" array is resulting in a 500 Internal Server Error.

curl --location --request PATCH 'https://localhost:9443/scim2/v2/Roles/c3445ed2-a6a9-466b-9796-1094b160770a' \
--header 'Content-Type: application/scim+json' \
--header 'Accept: application/scim+json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'Cookie: atbv=7701cee0-00fb-4a32-8d5a-ae677f76808c' \
--data '{
    "Operations": [
        {
            "op": "replace",
            "value": {
            }
        }
    ],
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ]
}'

We have modified this behavior to return a 400 Bad Request error instead.

Related Issue

@dewniMW
Copy link
Contributor

dewniMW commented Oct 26, 2023

@PasinduYeshan can you add the git issue?

@AnuradhaSK AnuradhaSK merged commit fc1db10 into wso2:master Oct 26, 2023
2 checks passed
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.

3 participants