summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashantsinalkar2019-07-16 13:22:45 +0530
committerprashantsinalkar2019-07-16 13:22:45 +0530
commit8e15bdb317c51c825323c3da747df4296539a779 (patch)
treeeed1b22cb8b8fb755106215022b0e8e1ecf5d46a
parent1eb42aaee7646186bd74ed9830c85ed84ad115b4 (diff)
downloadR_on_Cloud_Web_Interface-8e15bdb317c51c825323c3da747df4296539a779.tar.gz
R_on_Cloud_Web_Interface-8e15bdb317c51c825323c3da747df4296539a779.tar.bz2
R_on_Cloud_Web_Interface-8e15bdb317c51c825323c3da747df4296539a779.zip
added new system commands
-rw-r--r--instances.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/instances.py b/instances.py
index 9eebbd0..c57d164 100644
--- a/instances.py
+++ b/instances.py
@@ -26,11 +26,12 @@ def execute_code(code, session_id, R_file_id):
system_commands = re.compile(
r'unix\(.*\)|unix_g\(.*\)|unix_w\(.*\)|'
r'unix_x\(.*\)|unix_s\(.*\)|host|newfun'
- r'|execstr|ascii|mputl|dir\(\)'
+ r'|execstr|ascii|mputl|dir\(\)|'
+ r'system\(.*\)|system.call\(.*\)'
)
if system_commands.search(code):
return {
- 'output': 'System Commands not allowed',
+ 'output': 'System Commands are not allowed',
}
code = re.sub(r"View\(", "print(", code)