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

Safer handling of multipart nested JSON body props #878

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

mdmower
Copy link
Contributor

@mdmower mdmower commented Nov 28, 2023

If a multipart request body has schema oneOf, anyOf, or allOf, then automatic parsing of JSON properties throws. An object is expected. Fix the error today and add a TODO to add support for nested JSON props in multipart requests that utilize oneOf, anyOf, or allOf.

This issue was introduced in #730.

Fixes #875

If a multipart request body has schema oneOf, anyOf, or allOf, then
automatic parsing of JSON properties throws. An object is expected. Fix
the error today and add a TODO to add support for nested JSON props in
multipart requests that utilize oneOf, anyOf, or allOf.
@mdmower mdmower marked this pull request as ready for review November 28, 2023 06:01
@mdmower
Copy link
Contributor Author

mdmower commented Nov 28, 2023

@cdimascio - This is a quick fix for #875. The more complete fix will be to add support for allOf, anyOf, and/or oneOf, but I didn't want to delay this bugfix while expanded schema support is worked on.

Copy link
Owner

@cdimascio cdimascio left a comment

Choose a reason for hiding this comment

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

Thanks!

@cdimascio cdimascio merged commit 807e09c into cdimascio:master Nov 30, 2023
4 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.

Multer worked on 5.0.1 throws internal server error in 5.1.0
2 participants