evalidate 2.1.6__tar.gz → 2.1.8__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.
@@ -6,3 +6,5 @@ build/
6
6
  dist/
7
7
  .local/
8
8
  products.json
9
+ uv.lock
10
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evalidate
3
- Version: 2.1.6
3
+ Version: 2.1.8
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
@@ -10,6 +10,13 @@ Keywords: eval,evaluate,evaluation,expression,filter,grep,jg,jq,json,python,safe
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
13
20
  Requires-Python: >=3.8
14
21
  Provides-Extra: generate
15
22
  Requires-Dist: faker; extra == 'generate'
@@ -6,7 +6,7 @@ import ast
6
6
  import dataclasses
7
7
  from typing import Callable
8
8
 
9
- __version__ = '2.1.6'
9
+ __version__ = '2.1.8'
10
10
 
11
11
 
12
12
  class EvalException(Exception):
@@ -106,7 +106,7 @@ base_eval_model = EvalModel(
106
106
  "In", "NotIn", # "aaa" in i['list']
107
107
  "IfExp", # for if expressions, like: expr1 if expr2 else expr3
108
108
  "NameConstant", # for True and False constants
109
- "Div", "Mod",
109
+ "Div", # Mod removed because of "%1000000000d" % 0 attack
110
110
  "Is", "IsNot"
111
111
  ],
112
112
  )
@@ -1,5 +1,5 @@
1
1
  Yaroslav Polyakov: main author
2
2
 
3
3
  Daniel Rech: python3 porting, ideas for IfExp function call filtering
4
-
5
- Nagizaaz Shaik: .format() and .format_map() attacks for security_check()
4
+ Nagizaaz Shaik: .format() and .format_map() attacks for security_check()
5
+ Aleksandr Kovalko: discovery of memory exhaustion problem with 'Mod' (%) node allowed
@@ -23,7 +23,10 @@ __builtins__['eval']("print(1)")
23
23
  '"{0.__globals__[SECRET]}".format(one)',
24
24
 
25
25
  # resource exhaustion attacks
26
- '10 ** 10 ** 10'
26
+ '10 ** 10 ** 10',
27
+ '"x" * 1000000000000',
28
+ 'f"{0:1000000000}"',
29
+ '"%1000000000d" % 0',
27
30
  ]
28
31
 
29
32
  boom = """
@@ -19,6 +19,13 @@ readme = "README.md"
19
19
  requires-python = ">=3.8"
20
20
  classifiers = [
21
21
  "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.8",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Programming Language :: Python :: 3.14",
22
29
  "License :: OSI Approved :: MIT License",
23
30
  "Operating System :: OS Independent",
24
31
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes