Fix OpenAPI validation bypass#1563
Merged
Merged
Conversation
Guerra24
reviewed
May 17, 2026
Contributor
Guerra24
left a comment
There was a problem hiding this comment.
I would say we need this fix but I would prefer if it was applied in the same way the Crypt::DES or Image::Magick patches are applied.
6046446 to
b7d6c01
Compare
b7d6c01 to
45e59fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug found by @Guerra24 , please clarify if needed.
It is possible to bypass OpenAPI validation even when it's enabled with
Content-Type: application/json; charset=utf-8. The bug is in JSON::Validator, thanks to archey347 in related PR: jhthorsen/json-validator#289 and PR 266.For the sake of simplicity, multipart-bypass is applied, as applying the 289 fix would introduce another issue as discussed in 266 (which we might also bring in). We may also consider vendoring source + tests depending on how much we want to handle this problem.
Also explicitly added JSON::Validator.