Fix #635 on ynh_secure_remove

This commit is contained in:
Maniack Crudelis 2019-02-06 22:46:21 +01:00 committed by GitHub
parent 169ae96f0a
commit 060370ef88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -392,10 +392,10 @@ ynh_secure_remove () {
/var/www \
/home/yunohost.app"
if [[ -n "$2" ]]
then
echo "/!\ Packager ! You provided a second argument to ynh_secure_remove but it will be ignored... Use this helper with one argument at time." >&2
fi
if [ $# -ge 2 ]
then
echo "/!\ Packager ! You provided more than one argument to ynh_secure_remove but it will be ignored... Use this helper with one argument at time." >&2
fi
if [[ "$forbidden_path" =~ "$file" \
# Match all paths or subpaths in $forbidden_path