Skip to content

Fix OpenAPI validation bypass#1563

Merged
Difegue merged 2 commits into
Difegue:devfrom
psilabs-dev:bugfix/validation
May 17, 2026
Merged

Fix OpenAPI validation bypass#1563
Difegue merged 2 commits into
Difegue:devfrom
psilabs-dev:bugfix/validation

Conversation

@psilabs-dev
Copy link
Copy Markdown
Contributor

@psilabs-dev psilabs-dev commented May 17, 2026

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.

Copy link
Copy Markdown
Contributor

@Guerra24 Guerra24 left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@Guerra24 Guerra24 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Owner

@Difegue Difegue left a comment

Choose a reason for hiding this comment

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

gucci

@Difegue Difegue merged commit 98c21ee into Difegue:dev May 17, 2026
3 checks passed
@psilabs-dev psilabs-dev deleted the bugfix/validation branch May 17, 2026 19:42
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