henrib opened a new pull request, #412:
URL: https://github.com/apache/commons-jexl/pull/412

   ## Summary
   
   Five independent correctness bugs:
   
   - **Unicode escapes:** `\uXXXX` accepted `g`–`h` / `G`–`H` as valid hex 
digits due to an off-by-one in the range check; invalid sequences now pass 
through literally.
   - **Safe-navigation array access:** `a[b]?[c]` keyed the safe-navigation 
flag off the count of `?[` tokens rather than the child index, so the wrong 
bracket was marked.
   - **Regex escapes:** regex literal bodies were processed through the 
string-escape handler, destroying sequences like `\b`, `\d`, `\w`. Bodies are 
now passed through verbatim (`\/` → `/` only); `Pattern.compile` failures are 
wrapped as `JexlException.Parsing`; the `Debugger` gains a matching 
`escapeRegex` round-trip inverse.
   - **`empty()`/`size()` swallowing errors:** in a strict engine, 
non-cancellation errors were mapped to `true`/`0` instead of being rethrown; 
`JexlException.Cancel` was also silently swallowed in all modes.
   - **`switch` + `continue`:** a `continue` inside a `switch` was consumed by 
the switch instead of propagating to the enclosing loop, contrary to Java 
semantics.
   
   Closes JEXL-470.
   
   ## Test plan
   - [ ] `ArithmeticTest`, `ArithmeticOperatorTest`, `Issues400Test`, 
`SwitchTest`, `ParserTest` cover the individual fixes
   - [ ] `mvn test` passes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to