fix(sandbox): fix potential preload injection issue
This commit is contained in:
@@ -33,8 +33,6 @@ key = b64decode(key)
|
|||||||
|
|
||||||
os.chdir(running_path)
|
os.chdir(running_path)
|
||||||
|
|
||||||
# Preload code
|
|
||||||
{{preload}}
|
|
||||||
|
|
||||||
# Apply security if library is available
|
# Apply security if library is available
|
||||||
init_status = lib.init_seccomp({{uid}}, {{gid}}, {{enable_network}})
|
init_status = lib.init_seccomp({{uid}}, {{gid}}, {{enable_network}})
|
||||||
@@ -42,6 +40,8 @@ if init_status != 0:
|
|||||||
raise Exception(f"code executor err - {str(init_status)}")
|
raise Exception(f"code executor err - {str(init_status)}")
|
||||||
del lib
|
del lib
|
||||||
|
|
||||||
|
# Preload code
|
||||||
|
{{preload}}
|
||||||
# Decrypt and execute code
|
# Decrypt and execute code
|
||||||
code = b64decode("{{code}}")
|
code = b64decode("{{code}}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user