Преглед изворни кода

Staging/1.6.14 (#3136)

* Update upgrade.conf

* Delete wp-thumb.png

* Rename web/src/app/WebApp/Installers/Wordpress/WordpressSetup.php to web/src/app/WebApp/Installers/WordPress/WordPressSetup.php

* Upload it again

* Revert changes 1.6.13 v-add-web-php

* Fix #3127 Unable to save timezone

* Fix issue with installers

* Clean up before saving the rules restore file

* Apply update to firewall rules restore file

* Upgrade backup added firewall rules restore file

* Update v-stop-firewall

* Update MediaWiki (#3132)

* Update changelog

* Fix error caused by merge conflict

* Update versions

* Update web templates due to change to wordpress template

Co-authored-by: myrevery <16082142+myrevery@users.noreply.github.com>
Jaap Marcus пре 3 година
родитељ
комит
b0356cb2fa

+ 17 - 3
CHANGELOG.md

@@ -1,11 +1,25 @@
 # Changelog
 # Changelog
 All notable changes to this project will be documented in this file.
 All notable changes to this project will be documented in this file.
 
 
+## [1.6.14] - Service release
+
+## Bugfixes
+
+- Improve firewall rules cleanup #3135 @myrevery
+- Reverted changes to v-add-web-php as php8.2-imagick is now availble
+- Fixed an issue with editing timezone in when editing a server (#3127)
+- Fixed an issue with hostname during install
+- Fixed an issue with WordPress installer not working properly (#3129) 
+
+### Dependencies
+
+- Update MediaWiki to 1.39.0
+
 ## [1.6.13] - Service release
 ## [1.6.13] - Service release
 
 
 ### Bugfixes
 ### Bugfixes
 
 
-- Fix issue with php8.2-imagick not availble
+- Fix issue with php8.2-imagick not available
 - Fixed an issue with Letsnecrypt and no mail features enabled (#2930 #2931)
 - Fixed an issue with Letsnecrypt and no mail features enabled (#2930 #2931)
 
 
 ## [1.6.12] - Service release
 ## [1.6.12] - Service release
@@ -20,11 +34,11 @@ All notable changes to this project will be documented in this file.
 - Fixed an issue with v-backup-user loop when the user is unable to create a temp folder or not enough space (#2923 #3019)
 - Fixed an issue with v-backup-user loop when the user is unable to create a temp folder or not enough space (#2923 #3019)
 - Fixed an issue with restarting with via api (#1236 #30230)
 - Fixed an issue with restarting with via api (#1236 #30230)
 - Fixed an issue with *.co.uk and similar domains that does not create a www alias (#1750 and #3030)
 - Fixed an issue with *.co.uk and similar domains that does not create a www alias (#1750 and #3030)
-- Fixed an issue with enabling mysqld-iptables (#3035 @Krzysiek86 @neto373)
+- Fixed an issue with enabling mysqld-iptables (#3035 @Krzysiek86 @neto737)
 - Add an alias for composer in bash_aliases (#3070 @madito)
 - Add an alias for composer in bash_aliases (#3070 @madito)
 - Fix issues with multiple ips and hostname in installers (#3068)
 - Fix issues with multiple ips and hostname in installers (#3068)
 - Fixed an issue with Nginx + Apache2 settup and clearing proxy cache (#3060)
 - Fixed an issue with Nginx + Apache2 settup and clearing proxy cache (#3060)
-- Update Wordpress to avoid caching of Wordpress Rest API (#3069 @niktest)
+- Update WordPress to avoid caching of Wordpress Rest API (#3069 @niktest)
 - Fixed an issue with firewall and IPset tables shorter then 10 records (#3110 @myrevery)
 - Fixed an issue with firewall and IPset tables shorter then 10 records (#3110 @myrevery)
 - Delete rrd database on deleting database host
 - Delete rrd database on deleting database host
 - Fixed an issue where a user was unable to change database user #3051
 - Fixed an issue where a user was unable to change database user #3051

+ 1 - 1
README.md

@@ -2,7 +2,7 @@
 
 
 [Hestia Control Panel](https://www.hestiacp.com/)
 [Hestia Control Panel](https://www.hestiacp.com/)
 ==================================================
 ==================================================
-**Latest stable release:** Version 1.6.13 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md) | [![Build Status](https://drone.hestiacp.com/api/badges/hestiacp/hestiacp/status.svg?ref=refs/heads/main)](https://drone.hestiacp.com/hestiacp/hestiacp) <br>
+**Latest stable release:** Version 1.6.14 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md) | [![Build Status](https://drone.hestiacp.com/api/badges/hestiacp/hestiacp/status.svg?ref=refs/heads/main)](https://drone.hestiacp.com/hestiacp/hestiacp) <br>
 
 
 **Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
 **Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
 **Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>
 **Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>

+ 0 - 5
bin/v-add-web-php

@@ -70,11 +70,6 @@ if [[ `echo "$version 7.2" | awk '{print ($1 < $2)}'` == 1 ]]; then
     mph="$mph php$version-mcrypt"
     mph="$mph php$version-mcrypt"
 fi
 fi
 
 
-# Temp fix php8.2-imagick for https://github.com/oerdnj/deb.sury.org/issues/1840
-if [ $version = "8.2" ]; then
-    mph=$(echo "$mph" | sed -e "s/php$version-imagick//")
-fi
-
 # Check if version is 8.0 or higher and drop php json.
 # Check if version is 8.0 or higher and drop php json.
 if [[ ${version:0:1} == "8" ]]; then
 if [[ ${version:0:1} == "8" ]]; then
     mph=$(echo "$mph" | sed -e "s/php$version-json//")
     mph=$(echo "$mph" | sed -e "s/php$version-json//")

+ 10 - 12
bin/v-stop-firewall

@@ -10,9 +10,8 @@
 #                Variables & Functions                     #
 #                Variables & Functions                     #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Defining absolute path for iptables and modprobe
+# Defining absolute path for iptables
 iptables="/sbin/iptables"
 iptables="/sbin/iptables"
-modprobe="/sbin/modprobe"
 
 
 # Includes
 # Includes
 # shellcheck source=/etc/hestiacp/hestia.conf
 # shellcheck source=/etc/hestiacp/hestia.conf
@@ -39,7 +38,7 @@ check_hestia_demo_mode
 heal_iptables_links
 heal_iptables_links
 
 
 # Creating temporary file
 # Creating temporary file
-tmp=$(mktemp)
+tmp="$(mktemp)"
 
 
 # Flushing INPUT chain
 # Flushing INPUT chain
 echo "$iptables -P INPUT ACCEPT" >> $tmp
 echo "$iptables -P INPUT ACCEPT" >> $tmp
@@ -49,12 +48,11 @@ echo "$iptables -F INPUT" >> $tmp
 echo "$iptables -X hestia" >> $tmp
 echo "$iptables -X hestia" >> $tmp
 
 
 # Deleting custom chains
 # Deleting custom chains
-chains=$(cat $HESTIA/data/firewall/chains.conf 2>/dev/null)
 IFS=$'\n'
 IFS=$'\n'
-for chain in $chains; do
-    parse_object_kv_list "$chain"
-    echo "$iptables -F fail2ban-$CHAIN" >> $tmp
-    echo "$iptables -X fail2ban-$CHAIN" >> $tmp
+for chain in $(cat $HESTIA/data/firewall/chains.conf 2> /dev/null); do
+	parse_object_kv_list "$chain"
+	echo "$iptables -F fail2ban-$CHAIN" >> $tmp
+	echo "$iptables -X fail2ban-$CHAIN" >> $tmp
 done
 done
 
 
 # Applying rules
 # Applying rules
@@ -63,12 +61,12 @@ bash $tmp 2>/dev/null
 # Deleting temporary file
 # Deleting temporary file
 rm -f $tmp
 rm -f $tmp
 
 
-# Saving rules to the master iptables file
+# Clean up and saving rules to the master iptables file
 if [ -d "/etc/sysconfig" ]; then
 if [ -d "/etc/sysconfig" ]; then
-    /sbin/iptables-save > /etc/sysconfig/iptables
+	/sbin/iptables-save | sed -e 's/[[0-9]\+:[0-9]\+]/[0:0]/g' -e '/^-A fail2ban-[A-Z]\+ -s .\+$/d' > /etc/sysconfig/iptables
 else
 else
-	/sbin/iptables-save > /etc/iptables.rules
-	iptablesversion=$(iptables --version | head -1 | awk '{print $2}' | cut -f -2 -d .)
+	/sbin/iptables-save | sed -e 's/[[0-9]\+:[0-9]\+]/[0:0]/g' -e '/^-A fail2ban-[A-Z]\+ -s .\+$/d' > /etc/iptables.rules
+	iptablesversion="$(iptables --version | head -1 | awk '{print $2}' | cut -f -2 -d .)"
 	sd_unit="/lib/systemd/system/hestia-iptables.service"
 	sd_unit="/lib/systemd/system/hestia-iptables.service"
 	if [ ! -e "$sd_unit" ]; then
 	if [ ! -e "$sd_unit" ]; then
 		echo "[Unit]" >> $sd_unit
 		echo "[Unit]" >> $sd_unit

+ 14 - 14
bin/v-update-firewall

@@ -67,10 +67,10 @@ if [[ "$sshport" =~ ^[0-9]+$ ]] && [ "$sshport" -ne "22"  ]; then
 fi
 fi
 
 
 # Load ipset lists before adding Hestia iptables rules
 # Load ipset lists before adding Hestia iptables rules
-$BIN/v-update-firewall-ipset
+$BIN/v-update-firewall-ipset load
 
 
 # Creating temporary file
 # Creating temporary file
-tmp=$(mktemp)
+tmp="$(mktemp)"
 
 
 # Flushing INPUT chain
 # Flushing INPUT chain
 echo "$iptables -P INPUT ACCEPT" >> $tmp
 echo "$iptables -P INPUT ACCEPT" >> $tmp
@@ -83,7 +83,7 @@ if [ "$conntrack" != 'no' ] || grep --quiet container=lxc /proc/1/environ; then
     echo "$str" >> $tmp
     echo "$str" >> $tmp
 fi
 fi
 
 
-ips=$(ls $HESTIA/data/ips)
+ips="$(ls $HESTIA/data/ips)"
 # Handling local traffic
 # Handling local traffic
 for ip in $ips; do
 for ip in $ips; do
     echo "$iptables -A INPUT -s $ip -j ACCEPT" >> $tmp
     echo "$iptables -A INPUT -s $ip -j ACCEPT" >> $tmp
@@ -100,13 +100,13 @@ for line in $(sort -r -n -k 2 -t \' $rules); do
         state=""
         state=""
         action="-j $ACTION"
         action="-j $ACTION"
 
 
-        if [[ "$IP" =~ ^ipset: ]]; then
-            ipset_name="${IP#ipset:}"
-            $(v-list-firewall-ipset plain | grep "^$ipset_name\s" >/dev/null) || log_event $E_NOTEXIST "ipset object ($ipset_name) not found"
-            ip="-m set --match-set '${ipset_name}' src"
-        else
-            ip="-s $IP"
-        fi
+		if [[ "$IP" =~ ^ipset: ]]; then
+			ipset_name="${IP#ipset:}"
+			$(v-list-firewall-ipset plain | grep "^$ipset_name\s" > /dev/null) || log_event $E_NOTEXIST "IPset IP list ($ipset_name) not found"
+			ip="-m set --match-set '${ipset_name}' src"
+		else
+			ip="-s $IP"
+		fi
 
 
         # Adding multiport module
         # Adding multiport module
         if [[ "$PORT" =~ ,|-|: ]] ; then
         if [[ "$PORT" =~ ,|-|: ]] ; then
@@ -176,12 +176,12 @@ if [ -n "$FIREWALL_EXTENSION" ]; then
     rm -f $tmp
     rm -f $tmp
 fi
 fi
 
 
-# Saving rules to the master iptables file
+# Clean up and saving rules to the master iptables file
 if [ -d "/etc/sysconfig" ]; then
 if [ -d "/etc/sysconfig" ]; then
-    /sbin/iptables-save > /etc/sysconfig/iptables
+	/sbin/iptables-save | sed -e 's/[[0-9]\+:[0-9]\+]/[0:0]/g' -e '/^-A fail2ban-[A-Z]\+ -s .\+$/d' > /etc/sysconfig/iptables
 else
 else
-	/sbin/iptables-save > /etc/iptables.rules
-	iptablesversion=$(iptables --version | head -1 | awk '{print $2}' | cut -f -2 -d .)
+	/sbin/iptables-save | sed -e 's/[[0-9]\+:[0-9]\+]/[0:0]/g' -e '/^-A fail2ban-[A-Z]\+ -s .\+$/d' > /etc/iptables.rules
+	iptablesversion="$(iptables --version | head -1 | awk '{print $2}' | cut -f -2 -d .)"
 	sd_unit="/lib/systemd/system/hestia-iptables.service"
 	sd_unit="/lib/systemd/system/hestia-iptables.service"
 	if [ ! -e "$sd_unit" ]; then
 	if [ ! -e "$sd_unit" ]; then
 		echo "[Unit]" >> $sd_unit
 		echo "[Unit]" >> $sd_unit

+ 97 - 123
func/upgrade.sh

@@ -58,57 +58,57 @@ upgrade_health_check() {
 }
 }
 
 
 upgrade_welcome_message() {
 upgrade_welcome_message() {
-    echo
-    echo '                  _   _           _   _        ____ ____                      '
-    echo '                 | | | | ___  ___| |_(_) __ _ / ___|  _ \                     '
-    echo '                 | |_| |/ _ \/ __| __| |/ _` | |   | |_) |                    '
-    echo '                 |  _  |  __/\__ \ |_| | (_| | |___|  __/                     '
-    echo '                 |_| |_|\___||___/\__|_|\__,_|\____|_|                        '
-    echo "                                                                              "
-    echo "                    Hestia Control Panel Software Update                      "
-    echo "                               Version: ${DISPLAY_VER}                         "
-    if [[ "$new_version" =~ "beta" ]]; then
-        echo "                                BETA RELEASE                               "
-    fi
-    if [[ "$new_version" =~ "alpha" ]]; then
-        echo "                            DEVELOPMENT SNAPSHOT                           "
-        echo "                      NOT INTENDED FOR PRODUCTION USE                      "
-        echo "                            USE AT YOUR OWN RISK                           "
-    fi
-    echo
-    echo "=============================================================================="
-    echo
-    echo "[ ! ] IMPORTANT INFORMATION:                                                  "
-    echo
-    echo "Default configuration files and templates may be modified or replaced         "
-    echo "during the upgrade process. You may restore these files from:                 "
-    echo ""
-    echo "Backup directory: $HESTIA_BACKUP/                                             "
-    echo "Installation log: $LOG                                                        "
+	echo
+	echo '                  _   _           _   _        ____ ____                      '
+	echo '                 | | | | ___  ___| |_(_) __ _ / ___|  _ \                     '
+	echo '                 | |_| |/ _ \/ __| __| |/ _` | |   | |_) |                    '
+	echo '                 |  _  |  __/\__ \ |_| | (_| | |___|  __/                     '
+	echo '                 |_| |_|\___||___/\__|_|\__,_|\____|_|                        '
+	echo "                                                                              "
+	echo "                    Hestia Control Panel Software Update                      "
+	echo "                               Version: ${DISPLAY_VER}"
+	if [[ "$new_version" =~ "beta" ]]; then
+		echo "                                BETA RELEASE                                 "
+	fi
+	if [[ "$new_version" =~ "alpha" ]]; then
+		echo "                            DEVELOPMENT SNAPSHOT                             "
+		echo "                      NOT INTENDED FOR PRODUCTION USE                        "
+		echo "                            USE AT YOUR OWN RISK                             "
+	fi
+	echo
+	echo "============================================================================="
+	echo
+	echo "[ ! ] IMPORTANT INFORMATION:                                                 "
+	echo
+	echo "Default configuration files and templates may be modified or replaced        "
+	echo "during the upgrade process. You may restore these files from:                "
+	echo ""
+	echo "Backup directory: $HESTIA_BACKUP/"
+	echo "Installation log: $LOG"
 }
 }
 
 
 upgrade_welcome_message_log() {
 upgrade_welcome_message_log() {
-    echo "=============================================================================="
-    echo "Hestia Control Panel Software Update Log"
-    echo "=============================================================================="
-    echo
-    echo "OPERATING SYSTEM:      $OS_TYPE ($OS_VERSION)"
-    echo "CURRENT VERSION:       $VERSION"
-    echo "NEW VERSION:           $new_version"
-    echo "RELEASE BRANCH:        $RELEASE_BRANCH"
-    if [[ "$new_version" =~ "alpha" ]]; then
-        echo "BUILD TYPE:            Development snapshot"
-    elif [[ "$new_version" =~ "beta" ]]; then
-        echo "BUILD TYPE:            Beta release"
-    else
-        echo "BUILD TYPE:            Production release"
-    fi
-    echo 
-    echo "INSTALLER OPTIONS:"
-    echo "============================================================================="
-    echo "Send email notification on upgrade complete:      $UPGRADE_SEND_EMAIL"
-    echo "Send installed log output to admin email:         $UPGRADE_SEND_EMAIL_LOG"
-    echo 
+	echo "============================================================================="
+	echo "Hestia Control Panel Software Update Log"
+	echo "============================================================================="
+	echo
+	echo "OPERATING SYSTEM:      $OS_TYPE ($OS_VERSION)"
+	echo "CURRENT VERSION:       $VERSION"
+	echo "NEW VERSION:           $new_version"
+	echo "RELEASE BRANCH:        $RELEASE_BRANCH"
+	if [[ "$new_version" =~ "alpha" ]]; then
+		echo "BUILD TYPE:            Development snapshot"
+	elif [[ "$new_version" =~ "beta" ]]; then
+		echo "BUILD TYPE:            Beta release"
+	else
+		echo "BUILD TYPE:            Production release"
+	fi
+	echo
+	echo "INSTALLER OPTIONS:"
+	echo "============================================================================="
+	echo "Send email notification on upgrade complete:      $UPGRADE_SEND_EMAIL"
+	echo "Send installed log output to admin email:         $UPGRADE_SEND_EMAIL_LOG"
+	echo
 }
 }
 
 
 upgrade_step_message() {
 upgrade_step_message() {
@@ -275,40 +275,8 @@ upgrade_init_backup() {
     # Hestia Control Panel configuration files
     # Hestia Control Panel configuration files
     mkdir -p $HESTIA_BACKUP/conf/hestia/
     mkdir -p $HESTIA_BACKUP/conf/hestia/
 
 
-    # System services (apache2, nginx, bind9, vsftpd, etc).
-    if [ -n "$WEB_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$WEB_SYSTEM/
-    fi
-    if [ -n "$IMAP_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$IMAP_SYSTEM/
-    fi
-    if [ -n "$MAIL_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$MAIL_SYSTEM/
-    fi
-    if [ -n "$DNS_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$DNS_SYSTEM/
-    fi
-    if [ -n "$PROXY_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$PROXY_SYSTEM/
-    fi
-    if [ -n "$DB_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$DB_SYSTEM/
-    fi
-    if [ -n "$FTP_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$FTP_SYSTEM/
-    fi
-    if [ -n "$FIREWALL_SYSTEM" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$FIREWALL_SYSTEM/
-    fi
-    if [ -n "$FIREWALL_EXTENSION" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/$FIREWALL_EXTENSION/
-    fi
-    if [ -e "/etc/ssh/sshd_config" ]; then
-        mkdir -p $HESTIA_BACKUP/conf/ssh/
-    fi
-
-    # Hosting Packages
-    mkdir -p $HESTIA_BACKUP/packages/
+	# Hosting Packages
+	mkdir -p $HESTIA_BACKUP/packages/
 
 
     # Domain template files
     # Domain template files
     mkdir -p $HESTIA_BACKUP/templates/
     mkdir -p $HESTIA_BACKUP/templates/
@@ -458,41 +426,48 @@ upgrade_start_backup() {
             cp -f /etc/$FTP_SYSTEM.conf $HESTIA_BACKUP/conf/$FTP_SYSTEM/
             cp -f /etc/$FTP_SYSTEM.conf $HESTIA_BACKUP/conf/$FTP_SYSTEM/
         fi
         fi
 
 
-        if [ "$FTP_SYSTEM" = "proftpd" ]; then
-            cp -f /etc/proftpd/proftpd.conf $HESTIA_BACKUP/conf/$FTP_SYSTEM/
-        fi
-    fi
-    if [ -n "$FIREWALL_EXTENSION" ]; then
-        if [ "$DEBUG_MODE" = "true" ]; then
-            echo "      ---- $FIREWALL_EXTENSION"
-        fi
-        cp -f /etc/$FIREWALL_EXTENSION/*.conf $HESTIA_BACKUP/conf/$FIREWALL_EXTENSION/
-        cp -f /etc/$FIREWALL_EXTENSION/*.local $HESTIA_BACKUP/conf/$FIREWALL_EXTENSION/
-    fi
-    if [ -e "/etc/ssh/sshd_config" ]; then
-        if [ "$DEBUG_MODE" = "true" ]; then
-            echo "      ---- sshd"
-        fi
-        cp -fr /etc/ssh/* $HESTIA_BACKUP/conf/ssh/
-    fi
-    if [ -d "/etc/roundcube" ]; then
-        if [ "$DEBUG_MODE" = "true" ]; then
-            echo "      ---- Roundcube"
-        fi
-        cp -fr /etc/roundcube/* $HESTIA_BACKUP/conf/roundcube
-    fi
-    if [ -d "/etc/rainloop" ]; then
-        if [ "$DEBUG_MODE" = "true" ]; then
-            echo "      ---- Rainloop"
-        fi
-        cp -fr /etc/rainloop/* $HESTIA_BACKUP/conf/rainloop
-    fi
-    if [ -d "/etc/phpmyadmin" ]; then
-        if [ "$DEBUG_MODE" = "true" ]; then
-            echo "      ---- phpMyAdmin"
-        fi
-        cp -fr /etc/phpmyadmin/* $HESTIA_BACKUP/conf/phpmyadmin
-    fi
+		if [ "$FTP_SYSTEM" = "proftpd" ]; then
+			cp -f /etc/proftpd/proftpd.conf $HESTIA_BACKUP/conf/$FTP_SYSTEM/
+		fi
+	fi
+	if [ -n "$FIREWALL_SYSTEM" ]; then
+		if [ "$DEBUG_MODE" = "true" ]; then
+			echo "      ---- $FIREWALL_SYSTEM"
+		fi
+		[ -e "/etc/sysconfig/iptables" ] && cp -f /etc/sysconfig/iptables $HESTIA_BACKUP/conf/$FIREWALL_SYSTEM/
+		[ -e "/etc/iptables.rules" ] && cp -f /etc/iptables.rules $HESTIA_BACKUP/conf/$FIREWALL_SYSTEM/
+	fi
+	if [ -n "$FIREWALL_EXTENSION" ]; then
+		if [ "$DEBUG_MODE" = "true" ]; then
+			echo "      ---- $FIREWALL_EXTENSION"
+		fi
+		cp -f /etc/$FIREWALL_EXTENSION/*.conf $HESTIA_BACKUP/conf/$FIREWALL_EXTENSION/
+		cp -f /etc/$FIREWALL_EXTENSION/*.local $HESTIA_BACKUP/conf/$FIREWALL_EXTENSION/
+	fi
+	if [ -e "/etc/ssh/sshd_config" ]; then
+		if [ "$DEBUG_MODE" = "true" ]; then
+			echo "      ---- sshd"
+		fi
+		cp -fr /etc/ssh/* $HESTIA_BACKUP/conf/ssh/
+	fi
+	if [ -d "/etc/roundcube" ]; then
+		if [ "$DEBUG_MODE" = "true" ]; then
+			echo "      ---- Roundcube"
+		fi
+		cp -fr /etc/roundcube/* $HESTIA_BACKUP/conf/roundcube
+	fi
+	if [ -d "/etc/rainloop" ]; then
+		if [ "$DEBUG_MODE" = "true" ]; then
+			echo "      ---- Rainloop"
+		fi
+		cp -fr /etc/rainloop/* $HESTIA_BACKUP/conf/rainloop
+	fi
+	if [ -d "/etc/phpmyadmin" ]; then
+		if [ "$DEBUG_MODE" = "true" ]; then
+			echo "      ---- phpMyAdmin"
+		fi
+		cp -fr /etc/phpmyadmin/* $HESTIA_BACKUP/conf/phpmyadmin
+	fi
 }
 }
 
 
 upgrade_refresh_config() {
 upgrade_refresh_config() {
@@ -600,12 +575,11 @@ upgrade_phpmyadmin() {
             # Set config and log directory
             # Set config and log directory
             sed -i "s|'configFile' => ROOT_PATH . 'config.inc.php',|'configFile' => '/etc/phpmyadmin/config.inc.php',|g" /usr/share/phpmyadmin/libraries/vendor_config.php
             sed -i "s|'configFile' => ROOT_PATH . 'config.inc.php',|'configFile' => '/etc/phpmyadmin/config.inc.php',|g" /usr/share/phpmyadmin/libraries/vendor_config.php
 
 
-            # Create temporary folder and change permissions
-            if [ ! -d /usr/share/phpmyadmin/tmp ]; then
-                mkdir /usr/share/phpmyadmin/tmp
-                chown root:www-data /usr/share/phpmyadmin/tmp
-                chmod 770 /usr/share/phpmyadmin/tmp
-                
+			# Create temporary folder and change permissions
+			if [ ! -d /usr/share/phpmyadmin/tmp ]; then
+				mkdir /usr/share/phpmyadmin/tmp
+				chown root:www-data /usr/share/phpmyadmin/tmp
+				chmod 0770 /usr/share/phpmyadmin/tmp
             fi
             fi
 
 
             if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then
             if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then

+ 1 - 1
install/hst-install-debian.sh

@@ -31,7 +31,7 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
 VERBOSE='no'
 VERBOSE='no'
 
 
 # Define software versions
 # Define software versions
-HESTIA_INSTALL_VER='1.6.13'
+HESTIA_INSTALL_VER='1.6.14'
 # Dependencies
 # Dependencies
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2")
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2")
 fpm_v="8.0"
 fpm_v="8.0"

+ 1 - 1
install/hst-install-ubuntu.sh

@@ -31,7 +31,7 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
 VERBOSE='no'
 VERBOSE='no'
 
 
 # Define software versions
 # Define software versions
-HESTIA_INSTALL_VER='1.6.13'
+HESTIA_INSTALL_VER='1.6.14'
 # Dependencies
 # Dependencies
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2")
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2")
 fpm_v="8.0"
 fpm_v="8.0"

+ 1 - 1
install/upgrade/upgrade.conf

@@ -60,7 +60,7 @@ UPGRADE_UPDATE_FILEMANAGER_CONFIG='false'
 fm_v='7.8.7'
 fm_v='7.8.7'
 
 
 # Set version of PHPMailer to update during upgrade if not already installed
 # Set version of PHPMailer to update during upgrade if not already installed
-pm_v='6.6.5'
+pm_v='6.7.1'
 
 
 # Backblaze
 # Backblaze
 b2_v='3.5.0'
 b2_v='3.5.0'

+ 29 - 0
install/upgrade/versions/1.6.14.sh

@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Hestia Control Panel upgrade script for target version 1.6.14
+
+#######################################################################################
+#######                      Place additional commands below.                   #######
+#######################################################################################
+####### Pass through information to the end user in case of a issue or problem  #######
+#######                                                                         #######
+####### Use add_upgrade_message "My message here" to include a message          #######
+####### in the upgrade notification email. Example:                             #######
+#######                                                                         #######
+####### add_upgrade_message "My message here"                                   #######
+#######                                                                         #######
+####### You can use \n within the string to create new lines.                   #######
+#######################################################################################
+
+upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'yes'
+upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'yes'
+upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
+
+# Clean up firewall rules restore file.
+if [ "$FIREWALL_SYSTEM" = "iptables" ]; then
+	add_upgrade_message "About iptables rules [non-urgent]\n\nJust in case, if you added custom iptables rules in an unsupported way, they may have been lost.\n\nSee this issue to learn more:\nhttps://github.com/hestiacp/hestiacp/issues/3128"
+	echo "[ * ] Clean up firewall rules restore file..."
+	$BIN/v-update-firewall
+fi

+ 1 - 1
src/deb/hestia/control

@@ -1,7 +1,7 @@
 Source: hestia
 Source: hestia
 Package: hestia
 Package: hestia
 Priority: optional
 Priority: optional
-Version: 1.6.13
+Version: 1.6.14
 Section: admin
 Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com
 Homepage: https://www.hestiacp.com

+ 34 - 30
web/src/app/WebApp/Installers/MediaWiki/MediaWikiSetup.php

@@ -5,39 +5,39 @@ namespace Hestia\WebApp\Installers\MediaWiki;
 use Hestia\System\Util;
 use Hestia\System\Util;
 use Hestia\WebApp\Installers\BaseSetup as BaseSetup;
 use Hestia\WebApp\Installers\BaseSetup as BaseSetup;
 
 
-class MediaWikiSetup extends BaseSetup
-{
-    protected $appInfo = [
-        'name' => 'MediaWiki',
-        'group' => 'cms',
-        'enabled' => true,
-        'version' => '1.38.4',
-        'thumbnail' => 'MediaWiki-2020-logo.svg' //Max size is 300px by 300px
-    ];
+class MediaWikiSetup extends BaseSetup {
+	protected $appInfo = [
+		"name" => "MediaWiki",
+		"group" => "cms",
+		"enabled" => true,
+		"version" => "1.39.0",
+		"thumbnail" => "MediaWiki-2020-logo.svg", //Max size is 300px by 300px
+	];
 
 
     protected $appname = 'mediawiki';
     protected $appname = 'mediawiki';
     protected $extractsubdir = "/tmp-mediawiki";
     protected $extractsubdir = "/tmp-mediawiki";
 
 
-
-    protected $config = [
-        'form' => [
-            'admin_username' => ['type' => 'text', 'value' => 'admin'],
-            'admin_password' => 'password',
-            'language' => ['type' => 'text', 'value' => 'en'],
-            ],
-        'database' => true,
-        'resources' => [
-            'archive'  => [ 'src' => 'https://releases.wikimedia.org/mediawiki/1.38/mediawiki-1.38.4.zip' ],
-        ],
-        'server' => [
-            'nginx' => [
-                'template' => 'default'
-            ],
-            'php' => [ 
-                'supported' => [ '7.3','7.4' ],
-            ]
-        ], 
-    ];
+	protected $config = [
+		"form" => [
+			"admin_username" => ["type" => "text", "value" => "admin"],
+			"admin_password" => "password",
+			"language" => ["type" => "text", "value" => "en"],
+		],
+		"database" => true,
+		"resources" => [
+			"archive" => [
+				"src" => "https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.0.zip",
+			],
+		],
+		"server" => [
+			"nginx" => [
+				"template" => "default",
+			],
+			"php" => [
+				"supported" => ["7.4", "8.0"],
+			],
+		],
+	];
 
 
     public function install(array $options = null)
     public function install(array $options = null)
     {
     {
@@ -53,7 +53,11 @@ class MediaWikiSetup extends BaseSetup
 
 
         $sslEnabled = ($status->json[$this->domain]['SSL'] == 'no' ? 0 : 1);
         $sslEnabled = ($status->json[$this->domain]['SSL'] == 'no' ? 0 : 1);
 
 
-        $webDomain = ($sslEnabled ? "https://" : "http://") . $this->domain;
+		$this->appcontext->runUser(
+			"v-copy-fs-directory",
+			[$this->getDocRoot($this->extractsubdir . "/mediawiki-1.39.0/."), $this->getDocRoot()],
+			$result,
+		);
 
 
         $this->appcontext->runUser('v-copy-fs-directory', [
         $this->appcontext->runUser('v-copy-fs-directory', [
             $this->getDocRoot($this->extractsubdir . "/mediawiki-1.38.4/."),
             $this->getDocRoot($this->extractsubdir . "/mediawiki-1.38.4/."),

+ 0 - 0
web/src/app/WebApp/Installers/Wordpress/WordpressSetup.php → web/src/app/WebApp/Installers/WordPress/WordPressSetup.php


+ 0 - 0
web/src/app/WebApp/Installers/Wordpress/wp-thumb.png → web/src/app/WebApp/Installers/WordPress/wp-thumb.png


+ 1 - 1
web/templates/pages/edit_server.html

@@ -76,7 +76,7 @@
 											<select class="vst-list" name="v_timezone">	
 											<select class="vst-list" name="v_timezone">	
 												<?php
 												<?php
 													foreach ($v_timezones as $key => $value) {
 													foreach ($v_timezones as $key => $value) {
-														echo "\t\t\t\t<option value=\"".$key."\"";
+														echo "\t\t\t\t<option value=\"".$value."\"";
 														if ((!empty($value)) && ( $value == $v_timezone)){
 														if ((!empty($value)) && ( $value == $v_timezone)){
 															echo ' selected' ;
 															echo ' selected' ;
 														}
 														}