mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 19:28:25 +02:00
lambda was already disabled in the la case
This commit is contained in:
parent
746b9f91f2
commit
cd13753960
1 changed files with 0 additions and 5 deletions
|
@ -68,11 +68,6 @@ def safe_eval(template: str, env: dict[str, any] = None, macros: dict[str, str]
|
||||||
if isinstance(node.ctx, ast.Store) and node.id in globals_ | locals_:
|
if isinstance(node.ctx, ast.Store) and node.id in globals_ | locals_:
|
||||||
raise Exception(f'Can\'t set value of environment : "{node.id}"')
|
raise Exception(f'Can\'t set value of environment : "{node.id}"')
|
||||||
|
|
||||||
case ast.Lambda:
|
|
||||||
# lambda expression are disabled because they can allow forbidden action
|
|
||||||
# example: (lambda x: x.append(1))(track.tags)
|
|
||||||
raise Exception(f'Lambda expression are not allowed.')
|
|
||||||
|
|
||||||
# when calling any function
|
# when calling any function
|
||||||
case ast.Call:
|
case ast.Call:
|
||||||
# ban the function and method from the environment
|
# ban the function and method from the environment
|
||||||
|
|
Loading…
Reference in a new issue