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

Schema ID is not validated on resource creation #173

Open
icamys opened this issue Mar 18, 2024 · 2 comments · May be fixed by #174
Open

Schema ID is not validated on resource creation #173

icamys opened this issue Mar 18, 2024 · 2 comments · May be fixed by #174
Assignees

Comments

@icamys
Copy link
Contributor

icamys commented Mar 18, 2024

I've noticed that if the client sends a resource creation request with an invalid schema, it reaches the HTTP handler:

{
    "schemas":["urn:ietf:params:scim:invalid:schema"],
    "userName":"[email protected]"
}

Considering that schema and its extensions are attached to the resource on server creation, should any schema name validation be present? If so, then I'll be happy to implement this validation.

@q-uint
Copy link
Collaborator

q-uint commented Mar 19, 2024

We should indeed check this and not just ignore it, this is a bug.
By default we do ignore all fields that are not defined within the schema, but schemas is part of each schema be default.

@icamys icamys changed the title Schema name is not validated on resource creation Schema ID is not validated on resource creation Mar 20, 2024
@icamys
Copy link
Contributor Author

icamys commented Mar 20, 2024

@q-uint I've prepared a fix for this. Is it ok if I create a PR after #169 is merged?

@icamys icamys linked a pull request Mar 20, 2024 that will close this issue
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 a pull request may close this issue.

2 participants