Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[JsonPath] Improve compliance to the RFC test suite#60699

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@alexandre-daubois
Copy link
Member

@alexandre-dauboisalexandre-daubois commentedJun 5, 2025
edited
Loading

QA
Branch?7.3
Bug fix?yes
New feature?no
Deprecations?no
Issues-
LicenseMIT

This PR is a big step forward on making the component RFC compliant. Many more tests are now green as you can see in theJsonPathComplianceTestSuiteTest. Mainly, it's about dealing with whitespaces, better expressions parsing and supporting! and bare literals liketrue,false andnull.

dmaicher reacted with thumbs up emoji
@carsonbotcarsonbot added this to the7.3 milestoneJun 5, 2025
@alexandre-dauboisalexandre-daubois changed the title[JsonPath] Handle special whitespaces in filters[JsonPath] Handle special whitespaces in expressionsJun 5, 2025
@alexandre-daubois
Copy link
MemberAuthor

Thank you@stof, I didn't know that denial of service was actually a thing with regex. I updated accordingly.

@stof
Copy link
Member

stof commentedJun 5, 2025

@alexandre-daubois this can be a thing when you allow user input for the string being matched by the regex (which could totally happen in this component). Backtracking engines (like PCRE) have an exponential complexity based on the length of the input when attempting to match an affected regex (and failing to match it, as this is the worse case of backtracking).

This is commonly reported in the npm ecosystem (also because JS does not support possessive quantifiers in its Regexp syntax, and so cannot apply the easy fix to prevent them in many cases, making the issue more common)

alexandre-daubois reacted with heart emoji

@alexandre-daubois
Copy link
MemberAuthor

Applied your suggestions, it makes the code a bit simpler. Thanks!

@alexandre-dauboisalexandre-daubois changed the title[JsonPath] Handle special whitespaces in expressions[JsonPath] Improve compliance to the RFC test suiteJun 13, 2025
@alexandre-daubois
Copy link
MemberAuthor

alexandre-daubois commentedJun 13, 2025
edited
Loading

I reworked the whole PR to keep pushing forward the compliance test suite. This PR removes 265 skips, so that's pretty nice.

Status: Needs Review

@alexandre-dauboisalexandre-dauboisforce-pushed thejsonpath-blankspaces branch 2 times, most recently fromd71e0e5 to84193abCompareJune 13, 2025 14:57
@alexandre-dauboisalexandre-dauboisforce-pushed thejsonpath-blankspaces branch 9 times, most recently froma403f71 toc0a7d73CompareJune 15, 2025 13:00
@xabbuh
Copy link
Member

@alexandre-daubois FYI in#60793 I had to skip three more tests

@alexandre-daubois
Copy link
MemberAuthor

They are added back and fixed in this PR. Thanks!

xabbuh reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

Thank you@alexandre-daubois.

@nicolas-grekasnicolas-grekas merged commit0ff3ef1 intosymfony:7.3Jun 16, 2025
9 of 11 checks passed
@fabpotfabpot mentioned this pull requestJun 28, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@stofstofstof approved these changes

+1 more reviewer

@stloydstloydstloyd left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.3

Development

Successfully merging this pull request may close these issues.

6 participants

@alexandre-daubois@stof@xabbuh@nicolas-grekas@stloyd@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp