diff options
author | Michal Čihař <michal@cihar.com> | 2016-12-08 13:39:32 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2016-12-08 13:41:42 +0300 |
commit | f2bfa7d745a49ecc6625924a376c66ace194d8d1 (patch) | |
tree | f8a9deaf3547d71705cedd7f5f3d796711600933 /test/start-local-server | |
parent | 5f558b0a1d8c0da3a79da8b11d735d4c6febe5da (diff) |
Avoid running shell scripts as CGI
There is really no reason for that besides misconfigured servers.
This is followup for PMASA-2016-54
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'test/start-local-server')
-rwxr-xr-x | test/start-local-server | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/start-local-server b/test/start-local-server index c76d374051..8fb8037db7 100755 --- a/test/start-local-server +++ b/test/start-local-server @@ -1,5 +1,11 @@ #!/bin/sh +# Do not run as CGI +if [ -n "$GATEWAY_INTERFACE" ] ; then + echo 'Can not invoke as CGI!' + exit 1 +fi + set -e set -x |