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

Syntactic validation of JSONPath queries while creating conditions #559

Closed
KPrasch opened this issue Jul 30, 2024 · 4 comments · Fixed by #561
Closed

Syntactic validation of JSONPath queries while creating conditions #559

KPrasch opened this issue Jul 30, 2024 · 4 comments · Fixed by #561

Comments

@KPrasch
Copy link
Member

KPrasch commented Jul 30, 2024

Originally identified here https://github.com/nucypher/taco-web/pull/550/files#r1696888086

@derekpierre
Copy link
Member

derekpierre commented Jul 30, 2024

@KPrasch
Copy link
Member Author

KPrasch commented Jul 31, 2024

After some experimentation it appears that the grammar parsing of jsonpath-plus does not enforce syntactically invalid expressions.

Even the expression ...store.. ..book[**** is parsed (incorrectly) into the array Array(8) ["", .., store, .., "", .., book, ****]. This same expression will not be usable by nodes at decryption-time.

Ultimately this is both a developer experience (early error detection/prevention) and a compatibility concern (syntactically invalid expressions will not be rejected by taco nodes).

Also see this open issue from 2022 JSONPath-Plus/JSONPath#134

@KPrasch
Copy link
Member Author

KPrasch commented Jul 31, 2024

It also appears that neither the jsonpath or jsonpath-plus repositories are being actively maintained. (https://github.com/JSONPath-Plus/JSONPath)

Screenshot 2024-07-31 at 14 42 17

This messaging also appears to be reiterated in this comment on May 15, 2024 JSONPath-Plus/JSONPath#173 (comment)

As mentioned on the main page of the README, I am not actively maintaining this project, though I am accepting PRs. Feel free to submit a well-documented PR if you find an issue and your question is not answered by the README.

This may not be an issue if the implementation is stable enough though.

@derekpierre
Copy link
Member

Closed via #561

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 a pull request may close this issue.

2 participants