Skip to content

Commit 48ce000

Browse files
author
Kristan Kenney
committed
Merge branch 'main' into feature/427-redirect
2 parents 36fc6f5 + 81d077b commit 48ce000

File tree

289 files changed

+1919
-1135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+1919
-1135
lines changed

CHANGELOG.md

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,70 @@ All notable changes to this project will be documented in this file.
33

44
## [DEVELOPMENT]
55
### Features
6-
- Introduced support for PHPmyAdmin Single Sign On
6+
- Introduced single sign-on support for phpMyAdmin.
7+
- Introduced support for NGINX FastCGI cache.
8+
- Introduced support for SMTP Relay / smarthosts (server-wide or per-domain).
9+
- Introduced the ability to choose which webmail client to use per-domain (Roundcube or Rainloop).
10+
- Added B2 Backup Support for Remote Backup Location - thanks **@rez0n**!
11+
- Added template support for osTicket - thanks **@madito**!
12+
- Packages for phpMyAdmin, Roundcube, and Rainloop will be pulled directly from their upstream source instead of APT for new installations.
13+
- Added DNS records view to mail domains which provides DKIM, SPF, and other entries to use with an external provider.
14+
- Added an upgrade script to provide in-place upgrades to php7.4 (or any other version).
15+
716

817
### Bugfixes
9-
- Fixed an issue where user name was duplicated when editing FTP users (#1411)
18+
- Fixed an issue where user name was duplicated when editing FTP users. (#1411)
1019
- Fixed an issue where the iptables service would appear to be in a stopped state when fail2ban is stopped. (#1374)
1120
- Fixed an issue where the default language value was incorrectly set under Server Settings > Configure.
1221
- Fixed an issue with the dark theme where available updates were incorrectly displayed.
1322
- Fixed an issue where local and FTP backup files were not deleted when running `v-delete-user-backup`. (#1421)
14-
- Fixed an issue where IP addresses could not be deleted (#1423)
15-
- Improvements have been made to the API's error handling - thanks **@danielalexis**!
16-
- ZSTD Compression has been made multi-threaded.
23+
- Fixed an issue where IP addresses could not be deleted. (#1423)
24+
- Fixed an issue where `v-rebuild-user` would incorrectly rebuild domain items in addition to user account configuration.
25+
- Fixed an issue which caused a web domain's custom document root value to be lost when restoring from backup.
26+
- Fixed an issue which caused a `NSPOSIXErrorDomain:100` error when using Safari/iOS (thanks **@stsimb**).
27+
- Fixed an issue where exim ignored the configured mail quota limit.
28+
- Fixed an issue where invalid character validation was performed when editing mail auto replies.
29+
- Fixed an issue which caused Let's Encrypt to fail when using the Moodle template (thanks **@ArturoBlanco**).
30+
- Fixed an issue where the MySQL `wait_timeout` value was not saved due to wrong regexp attribute (thanks **@guicapanema**).
31+
- Fixed an issue where nginx web statistics authorization file was placed in the wrong directory.
32+
- Fixed several small issues that were reported when using PostgreSQL.
33+
- Improved reliability of mail domains and webmail clients.
34+
- Improved reliability of service restarts during upgrades.
35+
- Improved compatibility with Blesta / WHMCS plugins.
36+
- Improved API error handling routines - thanks **@danielalexis**!
37+
- Improved backup performance through the use of multi-threading when creating archives using the `zstd` compression type.
38+
- Improved error handling when creating firewall rules.
39+
- Improved handling of suspended users and domains to allow deletion without unsuspension.
40+
- Improved dependencies over package control to install `lsb-release` and `zstd`.
41+
- Improved SFTP connection handling to be case insensitive (thanks **@lazzurs**).
42+
- Improved domain validation to prevent creating subdomains when the top-level domain belongs to another account (thanks **@KuJoe** and **@sickcodes**).
43+
- Improved IDN domain handling to resolve issues with Let's Encrypt SSL and mail domain services.
44+
- Added private folder to openbasedir permissions for all main templates.
45+
- Disabled changing backup folder via Web UI because it used symbolic link instead of mount causing issues with restore mail / user files.
46+
- Fixed XSS vulnerability in `v-add-sys-ip` and user history log (thanks **@numanturle**).
47+
- Fixed remote code execution vulnerability which could occur when deleting SSH keys (thanks **@numanturle**).
48+
49+
## [1.3.5] - Service Release
50+
### Features
51+
- No new features have been introduced in this release.
52+
53+
### Bugfixes
54+
- Updated APT repository key for PHP from packages.sury.org (https://forum.hestiacp.com/t/apt-upgrade-failed-gpg-error-packages-sury-org)
55+
- Updated phpMyAdmin to v5.1.0.
56+
57+
## [1.3.4] - Service Release
58+
### Features
59+
- No new features have been introduced in this release.
60+
61+
### Bugfixes
62+
- Fixed xss vulnerability in v-add-sys-ip and user history log (thanks **@numanturle**)
63+
- Fixed remote execution possibility when deleting ssh key (thanks **@numanturle**)
64+
65+
## [1.3.3] - Service Release
66+
### Bugfixes
67+
- Improved if web folder already exists and do not follow symlink on chmod (thanks @0xGsch and @kikoas1995).
68+
- Improved api key authentification to prevent brute force attacks.
69+
- Improved ssh keys folder permission to prevent unauthorized access.
1770

1871
## [1.3.2] - Service Release
1972
### Features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[Hestia Control Panel](https://www.hestiacp.com/)
44
==================================================
5-
**Latest stable release:** Version 1.3.2 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
5+
**Latest stable release:** Version 1.3.5 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
66

77
**Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
88
**Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>

bin/v-add-backup-host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ sftpc() {
4949
set count 0
5050
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=$port $user@$host
5151
expect {
52-
"password:" {
52+
-nocase "password:" {
5353
send "$password\r"
5454
exp_continue
5555
}

bin/v-add-dns-domain

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ source $HESTIA/conf/hestia.conf
3838
# Additional argument formatting
3939
format_domain
4040
format_domain_idn
41+
domain_utf=$(idn -t --quiet -u "$domain_idn")
4142

4243
#----------------------------------------------------------#
4344
# Verifications #
@@ -48,11 +49,22 @@ is_format_valid 'user' 'domain' 'ip'
4849
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
4950
is_object_valid 'user' 'USER' "$user"
5051
is_object_unsuspended 'user' 'USER' "$user"
51-
is_domain_new 'dns' "$domain"
52+
53+
if [ "$($BIN/v-list-dns-domain $user $domain_utf plain |cut -f 1) " != "$domain" ]; then
54+
is_domain_new 'dns' "$domain_utf"
55+
fi
56+
if [ "$($BIN/v-list-dns-domain $user $domain_idn plain |cut -f 1) " != "$domain" ]; then
57+
is_domain_new 'dns' "$domain_idn"
58+
else
59+
is_domain_new 'dns' "$domain"
60+
fi
61+
5262
is_package_full 'DNS_DOMAINS'
5363
template=$(get_user_value '$DNS_TEMPLATE')
5464
is_dns_template_valid $template
5565

66+
is_base_domain_owner "$domain"
67+
5668
if [ ! -z "$ns1" ]; then
5769
ns1=$(echo $4 |sed -e 's/\.*$//g' -e 's/^\.*//g')
5870
is_format_valid 'ns1'

bin/v-add-dns-record

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
5050
fi
5151
fi
5252

53+
if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
54+
dvalue=$(idn -t --quiet -a "$dvalue" )
55+
record=$(idn -t --quiet -a "$record" )
56+
fi
57+
5358
# Cleanup quotes on dvalue
5459
# - [CAA] records will be left unchanged
5560
# - [SRV] will be stripped of double quotes even when containg spaces

bin/v-add-letsencrypt-domain

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,16 @@ debug_log() {
109109
# Perform verification if read-only mode is enabled
110110
check_hestia_demo_mode
111111

112+
112113
#----------------------------------------------------------#
113114
# Action #
114115
#----------------------------------------------------------#
115116

116-
117-
118-
119117
# Generate correct variables for mail domain SSL certificates
120118
if [ ! -z "$mail" ]; then
121119
root_domain=$domain
122120
domain="mail.$root_domain"
123-
webmail=$(get_object_value "mail" "$domain" '$WEBMAIL');
121+
webmail=$(get_object_value "mail" "DOMAIN" "$root_domain" '$WEBMAIL');
124122
if [ ! -z "$webmail" ]; then
125123
aliases="$WEBMAIL_ALIAS.$root_domain"
126124
fi

bin/v-add-mail-domain

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fi
3636
# Additional argument formatting
3737
format_domain
3838
format_domain_idn
39-
39+
domain_utf=$(idn -t --quiet -u "$domain_idn")
4040

4141
#----------------------------------------------------------#
4242
# Verifications #
@@ -47,10 +47,21 @@ is_format_valid 'user' 'domain' 'antispam' 'antivirus' 'dkim' 'dkim_size'
4747
is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM'
4848
is_object_valid 'user' 'USER' "$user"
4949
is_object_unsuspended 'user' 'USER' "$user"
50-
is_domain_new 'mail' "$domain"
50+
51+
if [ "$($BIN/v-list-mail-domain $user $domain_utf plain |cut -f 1) " != "$domain" ]; then
52+
is_domain_new 'mail' "$domain_utf"
53+
fi
54+
if [ "$($BIN/v-list-mail-domain $user $domain_idn plain |cut -f 1) " != "$domain" ]; then
55+
is_domain_new 'mail' "$domain_idn"
56+
else
57+
is_domain_new 'mail' "$domain"
58+
fi
59+
5160
is_package_full 'MAIL_DOMAINS'
5261
is_dir_symlink $HOMEDIR/$user/mail
5362

63+
is_base_domain_owner "$domain"
64+
5465
# Perform verification if read-only mode is enabled
5566
check_hestia_demo_mode
5667

@@ -104,23 +115,6 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
104115
echo "$local_ip" > $HOMEDIR/$user/conf/mail/$domain/ip
105116
fi
106117

107-
# Touch mailhelo.conf if it doesnt exist
108-
if [ ! -f "/etc/exim4/mailhelo.conf" ]; then
109-
touch /etc/exim4/mailhelo.conf
110-
fi
111-
112-
# Setting HELO for mail domain
113-
if [ ! -z "$local_ip" ]; then
114-
IP_RDNS=$(is_ip_rdns_valid "$local_ip")
115-
if [ ! -z "$IP_RDNS" ]; then
116-
if [ $(grep -s "^${domain}:" /etc/exim4/mailhelo.conf) ]; then
117-
sed -i "/^${domain}:/c\\${domain}:${IP_RDNS}" /etc/exim4/mailhelo.conf
118-
else
119-
echo ${domain}:${IP_RDNS} >> /etc/exim4/mailhelo.conf
120-
fi
121-
fi
122-
fi
123-
124118
# Adding antispam protection
125119
if [ "$antispam" = 'yes' ]; then
126120
touch $HOMEDIR/$user/conf/mail/$domain/antispam
@@ -169,7 +163,7 @@ fi
169163
# Add webmail configuration to mail domain
170164
if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
171165
if [ ! -z "$IMAP_SYSTEM" ]; then
172-
$BIN/v-add-sys-webmail $user $domain '' '' ''
166+
$BIN/v-add-sys-webmail $user $domain '' 'no'
173167
fi
174168
fi
175169

bin/v-add-sys-filemanager

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
# Includes
1414
source $HESTIA/func/main.sh
1515
source $HESTIA/conf/hestia.conf
16+
source $HESTIA/install/upgrade/upgrade.conf
1617

1718
MODE=$1
1819
user="admin"
1920

2021
FM_INSTALL_DIR="$HESTIA/web/fm"
21-
FM_V="7.4.1"
22-
FM_FILE="filegator_v${FM_V}.zip"
23-
FM_URL="https://github.com/filegator/filegator/releases/download/v${FM_V}/${FM_FILE}"
22+
FM_FILE="filegator_v${fm_v}.zip"
23+
FM_URL="https://github.com/filegator/filegator/releases/download/v${fm_v}/${FM_FILE}"
2424
COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
2525

2626

bin/v-add-sys-ip

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# info: add system ip address
3-
# options: IP NETMASK [INTERFACE] [USER] [IP_STATUS] [IP_NAME] [NAT_IP]
4-
# labels:
3+
# options: IP NETMASK [INTERFACE] [USER] [IP_STATUS] [IP_NAME] [NAT_IP] [HELO]
4+
# labels:
55
#
66
# example: v-add-sys-ip 216.239.32.21 255.255.255.0
77
#
@@ -28,6 +28,7 @@ user="${4-admin}"
2828
ip_status="${5-shared}"
2929
ip_name=$6
3030
nat_ip=$7
31+
helo=$8
3132

3233
# Includes
3334
source $HESTIA/func/main.sh
@@ -40,8 +41,8 @@ source $HESTIA/conf/hestia.conf
4041
# Verifications #
4142
#----------------------------------------------------------#
4243

43-
check_args '2' "$#" 'IP NETMASK [INTERFACE] [USER] [STATUS] [NAME] [NATED_IP]'
44-
is_format_valid 'ip' 'netmask' 'interface' 'user' 'ip_status'
44+
check_args '2' "$#" 'IP NETMASK [INTERFACE] [USER] [STATUS] [NAME] [NATED_IP] [HELO]'
45+
is_format_valid 'ip' 'netmask' 'iface' 'user' 'ip_status'
4546
is_ip_free
4647
is_object_valid 'user' 'USER' "$user"
4748
is_object_unsuspended 'user' 'USER' "$user"
@@ -112,6 +113,7 @@ U_WEB_DOMAINS='0'
112113
INTERFACE='$iface'
113114
NETMASK='$netmask'
114115
NAT='$nat_ip'
116+
HELO='$helo'
115117
TIME='$time'
116118
DATE='$date'" > $HESTIA/data/ips/$ip
117119
chmod 660 $HESTIA/data/ips/$ip
@@ -213,6 +215,11 @@ if [ ! -z "$FIREWALL_SYSTEM" ]; then
213215
$BIN/v-update-firewall
214216
fi
215217

218+
# Update ip helo for exim
219+
if [ ! -z "$MAIL_SYSTEM" ] && [ ! -z "$helo"]; then
220+
$BIN/v-change-sys-ip-helo $ip $helo
221+
fi
222+
216223
# Logging
217224
log_history "added system ip address $ip" '' 'admin'
218225
log_event "$OK" "$ARGUMENTS"

bin/v-add-sys-rainloop

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ source $HESTIA/func/main.sh
1414
source $HESTIA/conf/hestia.conf
1515
source $HESTIA/install/upgrade/upgrade.conf
1616

17-
MODE=$2
17+
MODE=$1
1818
UPDATE="no"
1919
# Version and Download paths
2020
# Version to be moved to upgrade script
@@ -54,7 +54,7 @@ fi
5454
if [ -f "/var/lib/rainloop/data/VERSION" ]; then
5555
version=$(cat $RL_INSTALL_DIR/data/VERSION);
5656
if [ "$version" == "$rl_v" ]; then
57-
echo "Error: Installed version ($version) is equal as the availble version ($rc_v)"
57+
echo "Error: Installed version ($version) is equal as the availble version ($rl_v)"
5858
exit 2;
5959
else
6060
UPDATE="yes"
@@ -88,7 +88,7 @@ if [ "$UPDATE" == "no" ]; then
8888
echo "Password: $admin_password" >> ~/.rainloop
8989
echo "Secret key: admin_$key" >> ~/.rainloop
9090

91-
unzip -q $RL_FILE
91+
unzip -q ${RL_INSTALL_DIR}/${RL_FILE}
9292

9393
mv ./data $RL_CONFIG_DIR/
9494
ln -s $RL_CONFIG_DIR/data/ ./data
@@ -151,8 +151,17 @@ if [ "$UPDATE" == "no" ]; then
151151

152152
else
153153
[ ! -f "${RC_INSTALL_DIR}/${RC_FILE}" ] && wget "$RL_URL" --quiet -O "${RL_INSTALL_DIR}/${RL_FILE}"
154-
unzip -q -o $RL_FILE
155-
rm $RL_INSTALL_DIR/$RL_FILE
154+
version=$(cat $RL_INSTALL_DIR/data/VERSION);
155+
156+
unzip -q -j rainloop-community-latest.zip "data/VERSION" -d $RL_INSTALL_DIR/
157+
version_source=$(cat $RL_INSTALL_DIR/VERSION);
158+
159+
# Check version inside .zip file in case hestia didn't update yet
160+
if [ "$version" != "$version_source" ]; then
161+
unzip -q ${RL_INSTALL_DIR}/${RL_FILE}
162+
rm $RL_INSTALL_DIR/$RL_FILE
163+
fi
164+
rm ${RL_INSTALL_DIR}/VERSION
156165
fi
157166

158167
#----------------------------------------------------------#

0 commit comments

Comments
 (0)