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>
This commit is contained in:
parent
5f558b0a1d
commit
f2bfa7d745
@ -3,6 +3,12 @@
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
#
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# More documentation about making a release is available at:
|
||||
# https://wiki.phpmyadmin.net/pma/Releasing
|
||||
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x$1 = x--quiet ] ; then
|
||||
stats=""
|
||||
shift
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
#!/bin/sh
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for proper number of command line args.
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: `basename $0` {path_to_pma_root_folder}"
|
||||
|
||||
@ -4,6 +4,12 @@
|
||||
#
|
||||
# Script for removing language selection from phpMyAdmin
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -lt 1 ] ; then
|
||||
echo "Usage: lang-cleanup.sh type"
|
||||
echo "Type can be one of:"
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > js/line_counts.php <<EOF
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for x in po/*.po ; do
|
||||
grep 'Team' $x | sed 's/.*: \(.*\)<.*/\1/'
|
||||
git shortlog -sne --no-merges -- $x | grep '^ [ 0-9][0-9]\{3\}'
|
||||
|
||||
@ -3,6 +3,12 @@
|
||||
# Removes mo files for incomplete translations
|
||||
#
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
#
|
||||
|
||||
@ -7,10 +7,16 @@
|
||||
# $2: MIMESubtype
|
||||
# $3: Transformation Name
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# != 3 ]
|
||||
then
|
||||
echo -e "Usage: ./generator_main_class.sh MIMEType MIMESubtype TransformationName\n"
|
||||
exit 65
|
||||
fi
|
||||
|
||||
./generator_plugin.sh "$1" "$2" "$3" "--generate_only_main_class"
|
||||
./generator_plugin.sh "$1" "$2" "$3" "--generate_only_main_class"
|
||||
|
||||
@ -11,6 +11,12 @@
|
||||
# $3: Transformation Name
|
||||
# $4: (optional) Description
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $#
|
||||
if [ $# -ne 3 -a $# -ne 4 ]; then
|
||||
echo -e "Usage: ./generator_plugin.sh MIMEType MIMESubtype TransformationName [Description]\n"
|
||||
@ -61,4 +67,4 @@ if [ $GenerateAbstractClass -eq 1 ]; then
|
||||
echo "Created $AbstractClassFile"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
@ -2,6 +2,12 @@
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
export LC_ALL=C
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Exit on failure
|
||||
set -e
|
||||
|
||||
|
||||
@ -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 -u
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Do not run as CGI
|
||||
if [ -n "$GATEWAY_INTERFACE" ] ; then
|
||||
echo 'Can not invoke as CGI!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "7.0" ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user