Просмотр исходного кода

Staging/1.5.8 (#2419)

* Prepare for release RC

* Update translations

* Update changelog

* Fix bug in update script

* Fixed in issue in the password reset function

* Fix issue in update script

Make sure .gnupg exists

* Update Slovak translations

@Hexaris

* Hide v-add-user-sftp-jail output and add some dots...

* Update Changelog + Versions

* Update phpmyadmin to 5.1.3

* Update changelog due to changes repo url MariaDB

* Update repo url upgrade script

* Update translations

@hexaris
@thomesrc

* Fix bug  (#2418)

* Fix bug

* Forgot to add ! before check

Moved [*] Install Roundcube inside if statement

Co-authored-by: Raphael Schneeberger <rs@scit.ch>
Jaap Marcus 4 лет назад
Родитель
Сommit
ca6d487b68

+ 22 - 0
CHANGELOG.md

@@ -1,6 +1,28 @@
 # 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.5.8] - Service release
+
+### Features
+
+ - No new features has been introduced
+
+### Bugfixes
+
+- Fixed an issue where SFTP jail was not enabled correctly for additional FTP accounts #2403 
+- Fixed an issue in the installer where the "Press any key to continue" prompt only responded to the Enter key #2398 
+- Fixed an issue where list sort order preference variable wasn't saved properly #2391
+- Fixed an issue with inconsistent behaviour in mail account settings information dialog #2392
+- Fixed an issue where .gnupg folder in /root/ had the wrong permissions set.
+- Fixed an issue where users were being redirected to login page when visiting /reset/ endpoint #2401
+- Fixed an issue where deleting sftp jail did not revert back permissions of said user. #2143
+- Fixed an issue where "REDIRECT" variable wasn't cleared correctly causing other sites to redirect to the domain after v-update-letsencrypt-ssl
+- Changed repository url MariaDB for new installs to https://wdlm.mariadb.com/repo/mariadb-server
+
+### Dependencies
+
+- Update phpMyAdmin to 5.1.3 (https://github.com/phpmyadmin/phpmyadmin/releases/tag/RELEASE_5_1_3)
+
 ## [1.5.7] - Service release
 ## [1.5.7] - Service release
 
 
 ### Bugfixes
 ### Bugfixes

+ 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.5.5 | [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.5.8 | [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>

+ 4 - 0
func/syshealth.sh

@@ -9,6 +9,10 @@
 # Read known configuration keys from $HESTIA/conf/defaults/$system.conf
 # Read known configuration keys from $HESTIA/conf/defaults/$system.conf
 function read_kv_config_file() {
 function read_kv_config_file() {
     local system=$1
     local system=$1
+    
+    if [ ! -f "$HESTIA/conf/defaults/$system.conf" ]; then
+        write_kv_config_file $system
+    fi
     while read -r str; do
     while read -r str; do
         echo "$str"
         echo "$str"
     done < <(cat $HESTIA/conf/defaults/$system.conf)
     done < <(cat $HESTIA/conf/defaults/$system.conf)

+ 9 - 6
install/hst-install-debian.sh

@@ -31,9 +31,9 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
 VERBOSE='no'
 VERBOSE='no'
 
 
 # Define software versions
 # Define software versions
-HESTIA_INSTALL_VER='1.5.8~alpha'
+HESTIA_INSTALL_VER='1.5.8'
 # Dependencies
 # Dependencies
-pma_v='5.1.2'
+pma_v='5.1.3'
 rc_v="1.5.2"
 rc_v="1.5.2"
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1")
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1")
 fpm_v="8.0"
 fpm_v="8.0"
@@ -1814,13 +1814,14 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Install Roundcube                  #
 #                       Install Roundcube                  #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
-
-echo "[ * ] Install Roundcube..."
 # Min requirements Dovecot + Exim + Mysql
 # Min requirements Dovecot + Exim + Mysql
-
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
-    $HESTIA/bin/v-add-sys-roundcube 
+    echo "[ * ] Install Roundcube..."
+    $HESTIA/bin/v-add-sys-roundcube
     write_config_value "WEBMAIL_ALIAS" "webmail"
     write_config_value "WEBMAIL_ALIAS" "webmail"
+else
+    write_config_value "WEBMAIL_ALIAS" ""
+    write_config_value "WEBMAIL_SYSTEM" ""
 fi
 fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -1951,6 +1952,8 @@ if [ "$postgresql" = 'yes' ]; then
     $HESTIA/bin/v-add-database-host pgsql localhost postgres $ppass
     $HESTIA/bin/v-add-database-host pgsql localhost postgres $ppass
 fi
 fi
 
 
+
+
 # Adding default domain
 # Adding default domain
 $HESTIA/bin/v-add-web-domain admin $servername
 $HESTIA/bin/v-add-web-domain admin $servername
 check_result $? "can't create $servername domain"
 check_result $? "can't create $servername domain"

+ 6 - 5
install/hst-install-ubuntu.sh

@@ -31,9 +31,9 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
 VERBOSE='no'
 VERBOSE='no'
 
 
 # Define software versions
 # Define software versions
-HESTIA_INSTALL_VER='1.5.8~alpha'
+HESTIA_INSTALL_VER='1.5.8'
 # Dependencies
 # Dependencies
-pma_v='5.1.2'
+pma_v='5.1.3'
 rc_v="1.5.2"
 rc_v="1.5.2"
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1")
 multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1")
 fpm_v="8.0"
 fpm_v="8.0"
@@ -1819,13 +1819,14 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Install Roundcube                  #
 #                       Install Roundcube                  #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
-
-echo "[ * ] Install Roundcube..."
 # Min requirements Dovecot + Exim + Mysql
 # Min requirements Dovecot + Exim + Mysql
-
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
+    echo "[ * ] Install Roundcube..."
     $HESTIA/bin/v-add-sys-roundcube
     $HESTIA/bin/v-add-sys-roundcube
     write_config_value "WEBMAIL_ALIAS" "webmail"
     write_config_value "WEBMAIL_ALIAS" "webmail"
+else
+    write_config_value "WEBMAIL_ALIAS" ""
+    write_config_value "WEBMAIL_SYSTEM" ""
 fi
 fi
 
 
 
 

+ 8 - 21
install/upgrade/manual/upgrade_mariadb.sh

@@ -25,34 +25,21 @@ if [ "$mysql_v" = "$mariadb_v" ]; then
     exit 0
     exit 0
 fi
 fi
 
 
-# Detect operating system and load codename
-if [ "$ID" = "ubuntu" ]; then
-    codename="$(lsb_release -s -c)"
-elif [ "$ID" = "debian" ]; then
-    codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
-else
-    echo "Can't detect the os version, cancelling."
-    exit 1
-fi
+#Get OS details
+os=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=')
+codename="$(lsb_release -s -c)"
+release="$(lsb_release -s -r)"
+RHOST='apt.hestiacp.com'
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Installing MariaDB repo
 # Installing MariaDB repo
-echo "Add new MariaDB repository..."
 apt="/etc/apt/sources.list.d/"
 apt="/etc/apt/sources.list.d/"
-if [ "$id" = "ubuntu" ]; then
-    echo "deb [arch=amd64] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$ID $codename main" > $apt/mariadb.list
-    APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
-else
-    echo "deb [arch=amd64] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$ID $codename main" > $apt/mariadb.list
-    if [ "$id" = "jessie" ]; then
-        APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
-    else
-        APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F1656F24C74CD1D8 > /dev/null 2>&1
-    fi
-fi
+echo "[ * ] MariaDB"
+   echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://dlm.mariadb.com/repo/mariadb-server/$mariadb_v/repo/$VERSION $codename main" > $apt/mariadb.list
+    curl -s https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor | tee /usr/share/keyrings/mariadb-keyring.gpg >/dev/null 2>&1
 
 
 # Update repository
 # Update repository
 echo "Update apt repository..."
 echo "Update apt repository..."

+ 1 - 1
install/upgrade/upgrade.conf

@@ -36,7 +36,7 @@ UPGRADE_RESTART_SERVICES='true'
 
 
 # Check if update is required by matching versions if version != current version run update 
 # Check if update is required by matching versions if version != current version run update 
 # Set version of phpMyAdmin to install during upgrade if not already installed
 # Set version of phpMyAdmin to install during upgrade if not already installed
-pma_v='5.1.2'
+pma_v='5.1.3'
 
 
 # Set version of RoundCube (Webmail) to update during upgrade if not already installed
 # Set version of RoundCube (Webmail) to update during upgrade if not already installed
 # Note: only applies to "non-apt installs >= 1.4.0 or manually phased out"
 # Note: only applies to "non-apt installs >= 1.4.0 or manually phased out"

+ 1 - 1
src/deb/hestia/control

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

BIN
web/locale/cs/LC_MESSAGES/hestiacp.mo


BIN
web/locale/de/LC_MESSAGES/hestiacp.mo


BIN
web/locale/en/LC_MESSAGES/hestiacp.mo


BIN
web/locale/es/LC_MESSAGES/hestiacp.mo


+ 8 - 4
web/locale/hestiacp.pot

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-01-26 12:53+0100\n"
+"POT-Creation-Date: 2022-02-06 11:55+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -3813,12 +3813,16 @@ msgstr ""
 msgid "Account has been suspended"
 msgid "Account has been suspended"
 msgstr ""
 msgstr ""
 
 
-#: ../../web/login/index.php:111 ../../web/login/index.php:144
-#: ../../web/login/index.php:156 ../../web/login/index.php:167
+#: ../../web/login/index.php:111
+msgid "Unsuported hash method"
+msgstr ""
+
+#: ../../web/login/index.php:113 ../../web/login/index.php:146
+#: ../../web/login/index.php:158 ../../web/login/index.php:169
 msgid "Invalid username or password"
 msgid "Invalid username or password"
 msgstr ""
 msgstr ""
 
 
-#: ../../web/login/index.php:176 ../../web/login/index.php:187
+#: ../../web/login/index.php:178 ../../web/login/index.php:189
 msgid "Invalid or missing 2FA token"
 msgid "Invalid or missing 2FA token"
 msgstr ""
 msgstr ""
 
 

BIN
web/locale/hu/LC_MESSAGES/hestiacp.mo


BIN
web/locale/nl/LC_MESSAGES/hestiacp.mo


BIN
web/locale/ru/LC_MESSAGES/hestiacp.mo


BIN
web/locale/sk/LC_MESSAGES/hestiacp.mo


BIN
web/locale/tr/LC_MESSAGES/hestiacp.mo


BIN
web/locale/uk/LC_MESSAGES/hestiacp.mo


+ 24 - 14
web/reset/index.php

@@ -44,23 +44,33 @@ if ((!empty($_POST['user'])) && (empty($_POST['code']))) {
                 $to = $data[$user]['CONTACT'];
                 $to = $data[$user]['CONTACT'];
                 $subject = sprintf(_('MAIL_RESET_SUBJECT'), date("Y-m-d H:i:s"));
                 $subject = sprintf(_('MAIL_RESET_SUBJECT'), date("Y-m-d H:i:s"));
                 $hostname = exec('hostname');
                 $hostname = exec('hostname');
-                $from = "noreply@".$hostname;
-                $from_name = _('Hestia Control Panel');
-                if (!empty($name)) {
-                    $mailtext = sprintf(_('GREETINGS_GORDON'), $name);
-                } else {
-                    $mailtext = _('GREETINGS');
-                }
+                $hostname_full = exec('hostname -f');
                 if ($hostname.":".$_SERVER['SERVER_PORT'] == $_SERVER['HTTP_HOST']) {
                 if ($hostname.":".$_SERVER['SERVER_PORT'] == $_SERVER['HTTP_HOST']) {
-                    $mailtext .= sprintf(_('PASSWORD_RESET_REQUEST'), $_SERVER['HTTP_HOST'], $user, $rkey, $_SERVER['HTTP_HOST'], $user, $rkey);
-                    if (!empty($rkey)) {
-                        send_email($to, $subject, $mailtext, $from, $from_name, $data[$user]['NAME']);
-                    }
-                    header("Location: /reset/?action=code&user=".$_POST['user']);
-                    exit;
-                } else {
+                    $check = true; 
+                    $hostname_email = $hostname;
+                }else if ($hostname_full.":".$_SERVER['SERVER_PORT'] == $_SERVER['HTTP_HOST']) {
+                    $check = true;
+                    $hostname_email = $hostname_full;
+                }else{
+                    $check = false;
                     $ERROR = "<a class=\"error\">"._('Invalid host domain')."</a>";
                     $ERROR = "<a class=\"error\">"._('Invalid host domain')."</a>";
                 }
                 }
+                if ($check == true){
+                    $from = "noreply@".$hostname_email;
+                    $from_name = _('Hestia Control Panel');
+                    if (!empty($name)) {
+                        $mailtext = sprintf(_('GREETINGS_GORDON'), $name);
+                    } else {
+                        $mailtext = _('GREETINGS');
+                    }
+                    $mailtext .= sprintf(_('PASSWORD_RESET_REQUEST'), $_SERVER['HTTP_HOST'], $user, $rkey, $_SERVER['HTTP_HOST'], $user, $rkey);
+                        if (!empty($rkey)) {
+                            send_email($to, $subject, $mailtext, $from, $from_name, $data[$user]['NAME']);
+                        }
+                        header("Location: /reset/?action=code&user=".$_POST['user']);
+                        exit;
+                }
+                
             }
             }
         } else {
         } else {
             $ERROR = "<a class=\"error\">"._('Please wait 15 minutes before sending a new request')."</a>";
             $ERROR = "<a class=\"error\">"._('Please wait 15 minutes before sending a new request')."</a>";