fix include attack

avoid `#include "/test_case/1000/1.in"`
This commit is contained in:
volltin@live.com 2017-03-17 16:15:16 +08:00
parent f758d2fe7b
commit 4861376841
2 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ services:
- /judger_run:exec,mode=777
- /spj:exec,mode=777
volumes:
- $PWD/tests/test_case:/test_case:ro
- $PWD/tests/test_case:/test_case
- /data/log:/log
- $PWD/server:/code:ro
- $PWD/token.txt:/token.txt

View File

@ -4,4 +4,5 @@ echo 0 > /tmp/counter
core=$(grep --count ^processor /proc/cpuinfo)
n=$(($core*4))
chmod 400 /token.txt /tmp/counter
chmod -R 400 /test_case
gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:wsgiapp