mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-19 03:06:30 +00:00
Check against correct phpMyAdmin config permissions
This commit is contained in:
parent
cd20dc00b7
commit
eef3582b93
@ -277,7 +277,6 @@ fi
|
|||||||
# printf "\r[OK] Submit phpMyAdmin POST login (1 round)\n"
|
# printf "\r[OK] Submit phpMyAdmin POST login (1 round)\n"
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
|
|
||||||
printf "[TEST] Evaluate successful phpMyAdmin login"
|
printf "[TEST] Evaluate successful phpMyAdmin login"
|
||||||
# 1st Try
|
# 1st Try
|
||||||
if [ "$( curl -sS -c cookie.txt -b cookie.txt localhost${URL} | tac | tac | grep -Ec "(Databases<.+SQL<.+Status<.+Users<.+Export<)|(\"User accounts\")" )" != "1" ]; then
|
if [ "$( curl -sS -c cookie.txt -b cookie.txt localhost${URL} | tac | tac | grep -Ec "(Databases<.+SQL<.+Status<.+Users<.+Export<)|(\"User accounts\")" )" != "1" ]; then
|
||||||
@ -302,3 +301,19 @@ else
|
|||||||
printf "\r[OK] Evaluate successful phpMyAdmin login (1 round)\n"
|
printf "\r[OK] Evaluate successful phpMyAdmin login (1 round)\n"
|
||||||
fi
|
fi
|
||||||
rm -f cookie.txt || true
|
rm -f cookie.txt || true
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### File permissions
|
||||||
|
###
|
||||||
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
|
DVLBOXPATH="${SCRIPTPATH}/../../"
|
||||||
|
PHPMYADMINPATH="${DVLBOXPATH}/.devilbox/www/htdocs${URL%index\.php}"
|
||||||
|
|
||||||
|
printf "[TEST] config.inc.php read-only file permissions"
|
||||||
|
if [ "$( stat --format '%a' "${PHPMYADMINPATH}config.inc.php" )" != "444" ]; then
|
||||||
|
printf "\r[FAIL] config.inc.php read-only file permissions: permission not 444\n"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
printf "\r[OK] config.inc.php read-only file permissions: permission 444\n"
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user