1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/blogotext_ynh.git synced 2024-09-03 18:15:52 +02:00

fix security hole + upgrade from previous version

This commit is contained in:
antoine 2020-11-07 11:00:51 +01:00
parent b20b8bc9ad
commit 38a27158ec
4 changed files with 29 additions and 6 deletions

View file

@ -20,7 +20,8 @@
setup_private=1
setup_public=1
upgrade=1
#upgrade=1 from_commit=CommitHash
#3.7.6~ynh1
upgrade=1 from_commit=e49200ad7f98acba70737dc7db314c51a2a07802
backup_restore=1
multi_instance=1
incorrect_path=1
@ -43,7 +44,7 @@
Email=
Notification=none
;;; Upgrade options
; commit=CommitHash
name=Name and date of the commit.
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
; commit=e49200ad7f98acba70737dc7db314c51a2a07802
name=3.7.6~ynh1(11oct2020)
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=password1234&port=666&

View file

@ -6,7 +6,7 @@
"en": "Lightweight Blog-Engine.",
"fr": "Un moteur de blog léger."
},
"version": "3.7.6~ynh1",
"version": "3.7.6~ynh2",
"url": "https://blogotext.org/",
"license": "MIT",
"maintainer": {

View file

@ -73,6 +73,19 @@ ynh_app_setting_set $app language $language
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# FIND AND OPEN A PORT
#=================================================
ynh_print_info "Configuring firewall..."
### Use these lines if you have to open a port for the application
### `ynh_find_port` will find the first available port starting from the given port.
### If you're not using these lines:
### - Remove the section "CLOSE A PORT" in the remove script
# Find a free port
#port=$(ynh_find_port 8095)
# Open this port
#ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
#=================================================
# INSTALL DEPENDENCIES

View file

@ -17,7 +17,7 @@ ynh_print_info "Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
port=$(ynh_app_setting_get $app port)
#port=$(ynh_app_setting_get $app port)
db_name=$(ynh_app_setting_get $app db_name)
db_user=$db_name
final_path=$(ynh_app_setting_get $app final_path)
@ -95,6 +95,15 @@ ynh_print_info "Removing logrotate configuration"
# CLOSE A PORT
#=================================================
#if yunohost firewall list | grep -q "\- $port$"
#then
# ynh_print_info "Closing port $port"
# ynh_exec_warn_less yunohost firewall disallow TCP $port
#fi
# close port if it was previously opened
# https://github.com/YunoHost-Apps/blogotext_ynh/pull/13
port=$(ynh_app_setting_get $app port)
if yunohost firewall list | grep -q "\- $port$"
then
ynh_print_info "Closing port $port"