Port's /vg/'s RCE prevention.

This commit is contained in:
Neerti
2018-03-09 00:32:16 -05:00
parent a3228cd0c5
commit 0a2bf1eb42
2 changed files with 24 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
/proc/send2irc(var/channel, var/msg)
if (config.use_irc_bot)
if (config.use_node_bot)
shell("node bridge.js -h \"[config.irc_bot_host]\" -p \"[config.irc_bot_port]\" -c \"[channel]\" -m \"[msg]\"")
shell("node bridge.js -h \"[config.irc_bot_host]\" -p \"[config.irc_bot_port]\" -c \"[channel]\" -m \"[escape_shell_arg(msg)]\"")
else
if (config.irc_bot_host)
if(config.irc_bot_export)
@@ -16,10 +16,10 @@
nudge_lib = "lib/nudge.so"
spawn(0)
call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[msg]")
call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[escape_shell_arg(msg)]")
else
spawn(0)
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [msg]")
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [escape_shell_arg(msg)]")
return
/proc/send2mainirc(var/msg)