Files
CHOMPStation2/code/modules/ext_scripts/python.dm
Leshana ae38fb3c48 Disable all shell() exec prox for extra security.
We do not use python or nodejs scripts. Our discord bot makes HTTP
requests.  Therefore we can entirely disable this code.  Even if we ever
want to start using these procs for discord integration, we would pipe it
through our HTTP discord proxy, not use shell().
With all instances of shell() disabled, we can't be attacked by it.
2017-07-20 22:24:27 -04:00

11 lines
352 B
Plaintext

/proc/ext_python(var/script, var/args, var/scriptsprefix = 1)
return // VOREStation Edit - Can't exploit shell if we never call shell!
if(scriptsprefix) script = "scripts/" + script
if(world.system_type == MS_WINDOWS)
script = replacetext(script, "/", "\\")
var/command = config.python_path + " " + script + " " + args
return shell(command)