-
Notifications
You must be signed in to change notification settings - Fork 22
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
Comments
zod.refine and a jsonpath library will be your friends. Analogous to the SIWE message string validation - https://github.com/nucypher/taco-web/blob/main/packages/taco-auth/src/providers/eip4361.ts#L20, https://github.com/nucypher/taco-web/blob/main/packages/taco-auth/src/providers/eip4361.ts#L9 |
After some experimentation it appears that the grammar parsing of jsonpath-plus does not enforce syntactically invalid expressions. Even the expression 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 |
It also appears that neither the jsonpath or jsonpath-plus repositories are being actively maintained. (https://github.com/JSONPath-Plus/JSONPath) This messaging also appears to be reiterated in this comment on May 15, 2024 JSONPath-Plus/JSONPath#173 (comment)
This may not be an issue if the implementation is stable enough though. |
Closed via #561 |
Originally identified here https://github.com/nucypher/taco-web/pull/550/files#r1696888086
The text was updated successfully, but these errors were encountered: