Skip to content

Commit 676eb76

Browse files
committed
Merge branch 'main' into release
2 parents 9d23c96 + 84430ad commit 676eb76

Some content is hidden

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

45 files changed

+414
-555
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [1.6.1] - Major Release (Feature / Quality Update)
5+
6+
### Bugfixes
7+
8+
- Fixed an issue with rate limit and alias domains (#2676, #2666)
9+
- Fixed an issue with reject spam option (#2687, #2864)
10+
- Fixed an issue in the installer when sieve is enabled (#2675, #2668)
11+
- Fixed an issue with File manager in development mode (#2682 #2644)
12+
- Fixed multiple small in templates (#2659 @ledoktre, #2680, #2671, #2679, #2670, #2681, #2699)
13+
- Fixed add second check if DNS resolving fails (#2678)
14+
- Fixed an issue where v-change-sys-hostname does not update host file (#2688 #2683)
15+
- Fixed an issue with IDN conversions not working on new server installs (#2692 @wojsmol)
16+
17+
### Enchantments
18+
19+
- Improve restart behaviour php-fpm
20+
- Improve updating process to make it faster.
21+
- Removed outdated / never used test scripts (#2685)
22+
23+
### Dependencies
24+
25+
- Update hestia-nginx to 1.23.0
26+
- Update PHPmailer to 6.6.3
27+
- Update Roundcube to 1.5.3
28+
429
## [1.6.0] - Major Release (Feature / Quality Update)
530

631
### Important Notes

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.6.0 | [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>
5+
**Latest stable release:** Version 1.6.1 | [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>
66

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

SECURITY.md

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,51 @@
1-
# Security Policy
1+
# Hestia CP Security policy
22

3-
## Supported Versions
3+
Welcome and thanks for taking interest in Hestia CP!
4+
5+
We are mostly interested in reports by actual Hestia CP users but all high quality contributions are welcome.
6+
7+
If you believe that you have have discovered a vulnerability in Hestia Control Panel,
8+
please let our development team know by submitting a report [Huntr.dev](https://huntr.dev/bounties/disclose/?target=https://github.com/hestiacp/hestiacp) Bounties and CVEs are automatically managed and allocated via the platform.
9+
10+
If you are unable to use [Huntr.dev](https://huntr.dev/bounties/disclose/?target=https://github.com/hestiacp/hestiacp) please send an email to support@hestiacp.com
11+
12+
We ask you to include a detailed description of the vulnerability, a list of services involved (e.g. exim, dovecot) and the versions which you've tested, full steps to reproduce the vulnerability, and include your findings and expected results.
13+
14+
Please do not open any public issue on Github or any other social media before the report has been published and a fix has been released.
15+
16+
With that, good luck hacking us ;)
17+
18+
## Supported versions
419

520
| Version | Supported |
621
| ------- | ------------------ |
722
| Latest | :white_check_mark: |
823

24+
## Qualifying Vulnerabilities
925

10-
## Reporting a Vulnerability
26+
### Vulnerabilities we really care about!
27+
- Remote command execution
28+
- Code/SQL Injection
29+
- Authentication bypass
30+
- Privilege Escalation
31+
- Cross-site scripting (XSS)
32+
- Performing limited admin actions without authorization
33+
- CSRF
1134

12-
If you believe that you have have discovered a vulnerability in Hestia Control Panel,
13-
please let our development team know by submitting a report [Huntr.dev](https://huntr.dev/bounties/disclose/?target=https://github.com/hestiacp/hestiacp) Bounties and CVEs are automatically managed and allocated via the platform.
35+
### Vulnerabilities we accept
36+
37+
- Open redirects
38+
- Password brute-forcing that circumvents rate limiting
39+
40+
## Non-Qualifying Vulnerabilities
41+
42+
- Theoretical attacks without proof of exploitability
43+
- Attacks that are the result of a third party library should be reported to the library maintainers
44+
- Social engineering
45+
- Reflected file download
46+
- Physical attacks
47+
- Weak SSL/TLS/SSH algorithms or protocols
48+
- Attacks involving physical access to a user’s device, or involving a device or network that’s already seriously compromised (eg man-in-the-middle).
49+
- The user attacks themselves
50+
- anything in `/test/` folder
1451

15-
If you are unable to [Huntr.dev](https://huntr.dev/bounties/disclose/?target=https://github.com/hestiacp/hestiacp) please send an email to support@hestiacp.com
16-
We ask that you please include a detailed description of the vulnerability,
17-
a list of services involved (e.g. exim, dovecot) and the versions which you've tested,
18-
full steps to reproduce the vulnerability, and include your findings and expected results.

bin/v-add-letsencrypt-domain

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ if [ "$proto" = "http-01" ]; then
187187
identifier=$(idn2 --quiet $identifier)
188188
fi
189189
if ! nslookup "${identifier}" > /dev/null 2>&1 ; then
190-
check_result "$E_NOTEXIST" "DNS record for $identifier doesn't exist"
190+
# Attempt against Cloudflare DNS
191+
if ! nslookup "${identifier}" 1.1.1.1 > /dev/null 2>&1 ; then
192+
check_result "$E_NOTEXIST" "DNS record for $identifier doesn't exist"
193+
fi
191194
fi
192195
done
193196
fi
@@ -230,7 +233,7 @@ url="$LE_API/acme/new-order"
230233
payload='{"identifiers":['
231234
for identifier in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
232235
if [[ "$identifier" = *[![:ascii:]]* ]]; then
233-
identifier=$(idn -t --quiet -a $identifier)
236+
identifier=$(idn2 --quiet $identifier)
234237
fi
235238
payload=$payload'{"type":"dns","value":"'$identifier'"},'
236239
done

bin/v-add-mail-domain

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: add mail domain
3-
# options: USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE]
3+
# options: USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE] [RESTART] [REJECT_SPAM]
44
#
55
# example: v-add-mail-domain admin mydomain.tld
66
#
@@ -18,6 +18,7 @@ antivirus=${4-yes}
1818
dkim=${5-yes}
1919
dkim_size=${6-1024}
2020
restart=${7-yes}
21+
reject=${8-yes}
2122

2223
# Includes
2324
# shellcheck source=/etc/hestiacp/hestia.conf
@@ -49,8 +50,8 @@ domain_utf=$(idn2 --quiet -d "$domain_idn")
4950
# Verifications #
5051
#----------------------------------------------------------#
5152

52-
check_args '2' "$#" 'USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE]'
53-
is_format_valid 'user' 'domain' 'antispam' 'antivirus' 'dkim' 'dkim_size' 'restart'
53+
check_args '2' "$#" 'USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE] [RESTART] [REJECT_SPAM]'
54+
is_format_valid 'user' 'domain' 'antispam' 'antivirus' 'dkim' 'dkim_size' 'restart' 'reject'
5455
is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM'
5556
is_object_valid 'user' 'USER' "$user"
5657
is_object_unsuspended 'user' 'USER' "$user"
@@ -93,7 +94,7 @@ fi
9394
new_timestamp
9495

9596
# Adding domain to mail.conf
96-
s="DOMAIN='$domain' ANTIVIRUS='$antivirus' ANTISPAM='$antispam' DKIM='$dkim' WEBMAIL=''"
97+
s="DOMAIN='$domain' ANTIVIRUS='$antivirus' ANTISPAM='$antispam' REJECT='$reject' DKIM='$dkim' WEBMAIL=''"
9798
s="$s SSL='no' LETSENCRYPT='no' CATCHALL='' ACCOUNTS='0' U_DISK='0' SUSPENDED='no' TIME='$time'"
9899
s="$s DATE='$date'"
99100
echo $s >> $USER_DATA/mail.conf
@@ -133,6 +134,9 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
133134
if [ "$antispam" = 'yes' ]; then
134135
touch "$HOMEDIR/$user/conf/mail/$domain/antispam"
135136
fi
137+
if [ "$reject" = 'yes' ]; then
138+
touch "$HOMEDIR/$user/conf/mail/$domain/reject_spam"
139+
fi
136140
fi
137141

138142
if [ -n "$ANTIVIRUS_SYSTEM" ]; then

bin/v-add-web-domain-backend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fi
8484
#----------------------------------------------------------#
8585

8686
# Restart backend server
87-
$BIN/v-restart-web-backend "$restart"
87+
$BIN/v-restart-web-backend "$restart" "$backend_version"
8888
check_result $? "Web backend restart failed" >/dev/null
8989

9090
# Logging

bin/v-change-mail-domain-rate-limit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ if [[ "$rate" = "system" ]]; then
6262
rate=''
6363
fi
6464

65-
$HESTIA/bin/v-rebuild-mail-domain "$user" "$domain"
6665
# Update quota
6766
update_object_value "mail" 'DOMAIN' "$domain" '$RATE_LIMIT' "$rate"
67+
$HESTIA/bin/v-rebuild-mail-domain "$user" "$domain"
6868

6969
# Logging
7070
$BIN/v-log-action "$user" "Info" "Mail" "Mail domain rate limit has changed ($rate)"

bin/v-change-sys-hostname

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,21 @@ else
4949
# Debian/Ubuntu
5050
hostnamectl set-hostname "$domain"
5151
echo "$domain" > /etc/hostname
52+
fi
5253

53-
# Update Roundcube password plugin configuration
54-
if [ -d /etc/roundcube/ ]; then
55-
sed -i "/password_hestia_host/c\$rcmail_config['password_hestia_host'] = '$domain';" /etc/roundcube/plugins/password/config.inc.php
56-
fi
57-
if [ -d /etc/rainloop/ ]; then
58-
sed -i "/hestia_host/c\hestia_host = \"$domain\"" /etc/rainloop/data/_data_/_default_/configs/plugin-hestia-change-password.ini
59-
fi
54+
# Update Roundcube password plugin configuration
55+
if [ -d /etc/roundcube/ ]; then
56+
sed -i "/password_hestia_host/c\$rcmail_config['password_hestia_host'] = '$domain';" /etc/roundcube/plugins/password/config.inc.php
6057
fi
58+
if [ -d /etc/rainloop/ ]; then
59+
sed -i "/hestia_host/c\hestia_host = \"$domain\"" /etc/rainloop/data/_data_/_default_/configs/plugin-hestia-change-password.ini
60+
fi
61+
62+
if [ -f /etc/hosts ];then
63+
if ! cat /etc/hosts | grep $domain > /dev/null ; then
64+
echo "127.0.0.1 $domain" >> /etc/hosts
65+
fi
66+
fi
6167

6268
#----------------------------------------------------------#
6369
# Hestia #

bin/v-change-sys-php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,18 @@ php_fpm="/etc/init.d/php$version-fpm"
4848

4949
rm -f /etc/php/*/fpm/pool.d/www.conf
5050
cp -f $HESTIA/install/deb/php-fpm/www.conf /etc/php/$version/fpm/pool.d/www.conf
51+
52+
for user in $($HESTIA/bin/v-list-sys-users plain); do
53+
$BIN/v-rebuild-web-domains "$user" 'no' >/dev/null 2>&1
54+
$BIN/v-rebuild-mail-domains "$user" 'no' >/dev/null 2>&1
55+
done;
56+
57+
# restart
5158
$HESTIA/bin/v-restart-web-backend
59+
$HESTIA/bin/v-restart-web
60+
$HESTIA/bin/v-restart-proxy
61+
62+
5263

5364
update-alternatives --set php /usr/bin/php$version
5465

bin/v-change-web-domain-backend-tpl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,18 @@ fi
165165
$BIN/v-restart-web "$restart"
166166
check_result $? "Web restart failed" >/dev/null
167167

168-
$BIN/v-restart-web-backend "$restart"
168+
# Detect prev version
169+
if [[ $BACKEND =~ ^.*PHP-([0-9])\_([0-9])$ ]]; then
170+
version="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
171+
else
172+
version=$(multiphp_default_version)
173+
fi
174+
175+
$BIN/v-restart-web-backend "$restart" "$version"
176+
if [ "$version" != "$backend_version" ]; then
177+
$BIN/v-restart-web-backend "$restart" "$backend_version"
178+
fi
179+
169180
check_result $? "Web backend restart failed" >/dev/null
170181

171182
# Logging

0 commit comments

Comments
 (0)