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 bStrictObjectTypeChecking not enforced for array elements #225

Closed
wants to merge 3 commits into from

Conversation

dktapps
Copy link
Contributor

@dktapps dktapps commented Feb 20, 2024

this created some security issues in my projects.

Might be worth having createInstance() check if the object in question has any @required properties.
In the second case, the model's @required properties wouldn't be populated, but no error would be thrown.
This makes it a requirement to use bStrictObjectTypeChecking in any security-conscious situation, but it wasn't considered at all in the case of arrays.

this created some security issues in my projects.

Might be worth having createInstance() check if the object in question has any @required properties.
In the second case, the model's @required properties wouldn't be populated, but no error would be thrown.
@cweiske
Copy link
Owner

cweiske commented May 18, 2024

Thank you for the patch!

cweiske pushed a commit that referenced this pull request Sep 8, 2024
Simple types like strings in arrays that expect an object
will throw an exception now when bStrictObjectTypeChecking is enabled.

BC break!

Resolves: #225
@cweiske
Copy link
Owner

cweiske commented Sep 8, 2024

Released with v5.0.0.

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.

None yet

2 participants