Ticket #5957 (closed enhancement: fixed)
[patch][cla] Add Safe Sub-Expressions Support for JsonPath
| Reported by: | kriszyp | Owned by: | kriszyp |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Dojox | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by dylan) (diff)
Currently JsonPath? syntax, permits sub-expressions that may be any valid JavaScript? expression. This greatly limits portability because environments that do have full JavaScript? capabilities can not evaluate the expression. Safe sub-expressions use a limited set of operators that can easily be implemented in using any language without requiring a JavaScript? VM. Safe sub-expressions are limited to use the following operators: =, !=, >=, <=, +, -, /, *, ?, : JsonPath? will support a safe sub-expression evaluation syntax checking, which prevents ad-hoc sub-expressions that do not adhere to this set of operators. Safe sub-expression evaluation also prevents arbitrary code execution in JsonPath?. If user supplied JsonPath? queries are executed it is highly recommended that safe sub-expressions evaluation is used to prevent arbitrary JavaScript? execution.