Merge pull request #642 from YunoHost/fix_ynh_secure_remove

Fix #635 on ynh_secure_remove
This commit is contained in:
Alexandre Aubin 2019-02-06 22:51:18 +01:00 committed by GitHub
commit 65e1bc2d8d
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