浏览代码

Fix OS remote code execution

Fixes #6
pull/36/head
父节点
当前提交
593028b3fb
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. +2
    -6
      src/app/views/project.py

+ 2
- 6
src/app/views/project.py 查看文件

@@ -64,14 +64,10 @@ class Project:
# Create the project directory if it doesnt exist
path = 'static/project' + data.projectid
if not os.path.isdir(path):
command = 'mkdir ' + path
os.popen(command)
sleep(0.2)
os.mkdir(path)
path = path + '/task' + data.taskid
if not os.path.isdir(path):
command = 'mkdir ' + path
os.popen(command)
sleep(0.2)
os.mkdir(path)
open(path + '/' + fn, 'wb').write(fileitem.file.read())
models.project.set_task_file(data.taskid, (path + "/" + fn))
except:


正在加载...
取消
保存