From 54a4fc6c9bf16ba093bad964f48413e51e113bed Mon Sep 17 00:00:00 2001 From: ewilly Date: Mon, 27 Feb 2017 21:05:30 +0100 Subject: [PATCH] Replace unprotected_regex with protected_regex --- scripts/install | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 0b3891e..40391b0 100644 --- a/scripts/install +++ b/scripts/install @@ -123,11 +123,10 @@ sudo sed -i "/# $app/d" /etc/hosts # if app is private, remove url to SSOWat conf from skipped_uris if [ "$is_public" = "No" ]; then - ynh_app_setting_delete "$app" unprotected_uris # escape magic chars in vars (lua magic chars are ().%+-*?[^$ according to https://www.lua.org/pil/20.2.html) domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g') pathluaregex=$([ "$path" == "/" ] || echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g') - regexList="${domainluaregex}${pathluaregex}/index.php%?f=.+$","${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$","${domainluaregex}${pathluaregex}/private/temp/.+%.zip$","${domainluaregex}${pathluaregex}/core/js/.*$","${domainluaregex}${pathluaregex}/templates/.*$" - ynh_app_setting_set "$app" unprotected_regex "$regexList" + regexList="${domainluaregex}${pathluaregex}/index%.php$","${domainluaregex}${pathluaregex}/index%.php%?p=.*$" + ynh_app_setting_set "$app" protected_regex "$regexList" sudo yunohost app ssowatconf fi