fix alias_traversal and change maintainer

This commit is contained in:
Jean-Baptiste Holcroft
2018-01-29 22:44:33 +01:00
parent 23645f9f33
commit 3b3cabbad4
5 changed files with 33 additions and 9 deletions

View File

@@ -100,6 +100,9 @@ then
ynh_replace_string "uwsgi_modifier1 " "#uwsgi_modifier1 " "$finalnginxconf"
ynh_store_file_checksum "$finalnginxconf"
else
# add rewrite for alias_traversal protection
ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf"
fi
#=================================================

View File

@@ -47,6 +47,13 @@ if [ -z "$final_path" ]; then
ynh_app_setting_set "$app" final_path "$final_path"
fi
# If path_url doesn't exist, create it
if [ -z "$path_url" ]; then
path_url=$(ynh_app_setting_get "$app" path)
ynh_app_setting_set "$app" path_url "$final_path"
ynh_app_setting_delete "$app" path
fi
# Detect old installation style
if [ -e /opt/yunohost/ffsync ]; then
service ffsync stop
@@ -111,6 +118,9 @@ then
ynh_replace_string "uwsgi_modifier1 " "#uwsgi_modifier1 " "$finalnginxconf"
ynh_store_file_checksum "$finalnginxconf"
else
# add rewrite for alias_traversal protection
ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf"
fi