evalidate 2.1.8__tar.gz → 2.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evalidate
3
- Version: 2.1.8
3
+ Version: 2.1.9
4
4
  Summary: Validation and secure evaluation of untrusted python expressions
5
5
  Project-URL: Homepage, https://github.com/yaroslaff/evalidate
6
6
  Project-URL: Issues, https://github.com/yaroslaff/evalidate/issues
@@ -6,7 +6,7 @@ import ast
6
6
  import dataclasses
7
7
  from typing import Callable
8
8
 
9
- __version__ = '2.1.8'
9
+ __version__ = '2.1.9'
10
10
 
11
11
 
12
12
  class EvalException(Exception):
@@ -112,7 +112,9 @@ base_eval_model = EvalModel(
112
112
  )
113
113
 
114
114
  mult_eval_model = base_eval_model.clone()
115
- mult_eval_model.nodes.append('Mul')
115
+
116
+ # No RCE, but memory exhaustion attacks: 1e10 ** 1e10, "x" * 1e12, f"{0:1e9}", "%1e9d" % 0
117
+ mult_eval_model.nodes.extend(['Mul', 'Mod'])
116
118
 
117
119
  class Expr():
118
120
  def __init__(self, expr, model=None, filename=None):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes