elijahbenizzy opened a new pull request, #947:
URL: https://github.com/apache/burr/pull/947

   `Condition.safe_expr()` is documented for expressions from less-trusted 
sources, but its interpreter placed no bound on arithmetic. `10**10**10` or 
`"a" * 10000000000` passed validation and then ran until the process was killed.
   
   This change adds explicit bounds, documented in the docstring: expression 
size (500 nodes), exponent and base width for `**`, repeat count and result 
length for sequence `*`/`+`, and a 4096-bit backstop on every integer result. 
Literal-only subtrees are checked at `safe_expr()` construction so the obvious 
cases fail early; everything else fails at `run()` with a plain `ValueError`. 
`%` with a string left operand is rejected for the same reason.
   
   No existing test changed; 12 added.
   


-- 
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