Skip to content

Commit a1922a5

Browse files
author
Kristan Kenney
committed
Merge branch 'main' into feature/package-management
2 parents 98f520b + eef1173 commit a1922a5

File tree

225 files changed

+2028
-2017
lines changed

Some content is hidden

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

225 files changed

+2028
-2017
lines changed

CHANGELOG.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,55 @@ All notable changes to this project will be documented in this file.
44
## [DEVELOPMENT]
55
### Features
66
- Introduced single sign-on support for phpMyAdmin.
7-
- Introduced support for NGINX Fast CGI Cache.
7+
- Introduced support for NGINX FastCGI cache.
88
- 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)
9+
- Introduced the ability to choose which webmail client to use per-domain (Roundcube or Rainloop).
1010
- Added B2 Backup Support for Remote Backup Location - thanks **@rez0n**!
11-
- Added template support for osticket - thanks **@madito**!
12-
- Install phpMyAdmin directly from source and provide a migration script for existing installations.
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.
1314
- Added an upgrade script to provide in-place upgrades to php7.4 (or any other version).
1415

16+
1517
### Bugfixes
1618
- Fixed an issue where user name was duplicated when editing FTP users. (#1411)
1719
- Fixed an issue where the iptables service would appear to be in a stopped state when fail2ban is stopped. (#1374)
1820
- Fixed an issue where the default language value was incorrectly set under Server Settings > Configure.
1921
- Fixed an issue with the dark theme where available updates were incorrectly displayed.
2022
- Fixed an issue where local and FTP backup files were not deleted when running `v-delete-user-backup`. (#1421)
2123
- Fixed an issue where IP addresses could not be deleted. (#1423)
22-
- Fixed an issue where nginx web statistics authorization file was placed in the wrong directory.
23-
- Fixed multiple small issues in mail domain handling and webmail stack.
24-
- Fixed an issue which caused the custom docroot value to be not set when restoring a backup.
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.
2526
- Fixed an issue which caused a `NSPOSIXErrorDomain:100` error when using Safari/iOS (thanks **@stsimb**).
26-
- Fixed multiple small issues which occured when using PostgreSQL.
27-
- Fixed an issue where exim ignored the conigured mail quota limit.
28-
- Fixed an issue with the invalid character validation for mail auto replies.
29-
- Fixed an issue which caused Let's Encrypt to fail when using the Moodle template - thanks **@ArturoBlanco**.
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**).
3030
- 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.
3135
- Improved compatibility with Blesta / WHMCS plugins.
3236
- Improved API error handling routines - thanks **@danielalexis**!
33-
- Improved performance by enabling multithreading when creating backups using the `zstd` compression type.
37+
- Improved backup performance through the use of multi-threading when creating archives using the `zstd` compression type.
3438
- Improved error handling when creating firewall rules.
35-
- Improved overview to provide DKIM and other mail server settings in mail overview.
36-
- Improved removal handling to allow the remove of suspended users, domains, etc.
39+
- Improved handling of suspended users and domains to allow deletion without unsuspension.
3740
- Improved dependencies over package control to install `lsb-release` and `zstd`.
38-
- Improved SFTP connection handling, changing expect to be case insensitive in SFTP (thanks **@lazzurs**).
41+
- Improved SFTP connection handling to be case insensitive (thanks **@lazzurs**).
3942
- Improved domain validation to prevent creating subdomains when the top-level domain belongs to another account (thanks **@KuJoe** and **@sickcodes**).
4043
- Improved IDN domain handling to resolve issues with Let's Encrypt SSL and mail domain services.
41-
- Added private folder to openbasedir permission for all main templates.
44+
- Added private folder to openbasedir permissions for all main templates.
4245
- Disabled changing backup folder via Web UI because it used symbolic link instead of mount causing issues with restore mail / user files.
43-
- Fixed xss vulnerability in v-add-sys-ip and user history log (thanks **@numanturle**)
44-
- Fixed remote execution possibility when deleting ssh key (thanks **@numanturle**)
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.
4556

4657
## [1.3.4] - Service Release
4758
### 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.4 | [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-dns-domain

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# Argument definition
2020
user=$1
21-
domain=$(idn -t --quiet -a "$2" )
21+
domain=$2
2222
ip=$3
2323
ns1=$4
2424
ns2=$5
@@ -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,7 +49,16 @@ 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

bin/v-add-dns-on-web-alias

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

1515
# Argument definition
1616
user=$1
17-
alias=$(idn -t --quiet -a "$2" )
17+
alias=$2
1818
ip=$3
1919
restart=$4
2020

bin/v-add-dns-record

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
# Argument definition
1919
user=$1
20-
domain=$(idn -t --quiet -a "$2" )
20+
domain=$2
21+
domain_idn=$2
2122
record=$(idn -t --quiet -u "$3" )
2223
record=$(echo "$record" | tr '[:upper:]' '[:lower:]')
2324
rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]')
@@ -71,6 +72,8 @@ fi
7172
# Additional argument formatting
7273
format_domain
7374
format_domain_idn
75+
# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
76+
7477

7578
#----------------------------------------------------------#
7679
# Verifications #

bin/v-add-domain

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

1515
# Argument definition
1616
user=$1
17-
domain=$(idn -t --quiet -a "$2" )
17+
domain=$2
1818
ip=$3
1919
restart="${4-yes}"
2020

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash
2-
# info: Adding fast cgi nginx support
2+
# info: Add FastCGI nginx support
33
# options: USER DOMAIN [DEBUG]
44
# labels: hestia web
55
#
6-
# example: v-add-web-domain-fast-cgi-cache user domain.tld
6+
# example: v-add-fastcgi-cache user domain.tld
77
#
8-
# Function enables fast cgi support for Nginx
9-
# Add "yes" as last parameter append debug information to response headers
8+
# The function enables FastCGI cache for nginx
9+
# Add "yes" as last parameter to append debug information to response headers
1010

1111

1212
#----------------------------------------------------------#
@@ -15,7 +15,7 @@
1515

1616
# Argument definition
1717
user=$1
18-
domain=$(idn -t --quiet -a "$2" )
18+
domain=$2
1919
debug=$3
2020

2121
# Includes
@@ -45,16 +45,16 @@ check_hestia_demo_mode
4545
# Load domain data
4646
parse_object_kv_list $(grep "DOMAIN='$domain'" $USER_DATA/web.conf)
4747

48-
# Check if web server is NGINX standalone
48+
# Check if nginx is not in proxy mode
4949
if [ "$WEB_SYSTEM" != 'nginx' ]; then
50-
echo "Error: NGINX not in Stand Alone mode"
50+
echo "Error: nginx is in proxy mode"
5151
exit $E_NOTEXIST
5252
fi
5353

54-
5554
if ! grep --quiet "forcessl" $HESTIA/data/templates/web/nginx/default.tpl; then
5655
$BIN/v-update-web-templates
5756
fi
57+
5858
fastcgi="$HOMEDIR/$user/conf/web/$domain/$WEB_SYSTEM.fastcgi_cache.conf"
5959
no_cache='$no_cache'
6060
cookie_session='$cookie_session'
@@ -63,9 +63,11 @@ status='$upstream_cache_status'
6363

6464
cat << EOF > $fastcgi
6565
fastcgi_cache $domain;
66-
fastcgi_no_cache $no_cache;
66+
fastcgi_cache_valid 200 2m;
67+
fastcgi_cache_valid 301 302 10m;
68+
fastcgi_cache_valid 404 10m;
6769
fastcgi_cache_bypass $no_cache;
68-
fastcgi_cache_bypass $cookie_session $http_x_update;
70+
fastcgi_no_cache $no_cache;
6971
EOF
7072

7173
if [ ! -z "$debug" ]; then
@@ -75,18 +77,18 @@ fi
7577
chown root:$user $fastcgi
7678
chmod 640 $fastcgi
7779

78-
str="fastcgi_cache_path /var/cache/nginx/php-fpm/$domain levels=2"
79-
str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
80-
conf='/etc/nginx/conf.d/01_fast_cgi_caching_pool.conf'
81-
if [ -e "$conf" ]; then
80+
str="fastcgi_cache_path /var/cache/nginx/micro/$domain levels=1:2"
81+
str="$str keys_zone=$domain:10m max_size=512m inactive=30m;"
82+
conf='/etc/nginx/conf.d/fastcgi_cache_pool.conf'
83+
if [ -f "$conf" ]; then
8284
if [ -z "$(grep "=${domain}:" $conf)" ]; then
8385
echo "$str" >> $conf
8486
fi
8587
else
8688
echo "$str" >> $conf
8789
fi
8890

89-
mkdir -p /var/cache/nginx/php-fpm/$domain
91+
mkdir -p /var/cache/nginx/micro/$domain
9092

9193
#----------------------------------------------------------#
9294
# Hestia #
@@ -96,15 +98,15 @@ if [ -z "$FASTCGI" ]; then
9698
add_object_key "web" 'DOMAIN' "$domain" 'FASTCGI_CACHE' 'ALIAS'
9799
fi
98100

99-
# Set FASTCGI flag to enabled
101+
# Set FastCGI cache flag to enabled
100102
update_object_value 'web' 'DOMAIN' "$domain" '$FASTCGI_CACHE' 'yes'
101103

102104
# Restart web server
103105
$BIN/v-restart-web
104-
check_result $? "Web restart failed" > /dev/null
106+
check_result $? "Web server restart failed" > /dev/null
105107

106108
# Logging
107-
log_history "enabled fast cgi support for $domain"
109+
log_history "Enabled FastCGI cache for $domain"
108110
log_event "$OK" "$ARGUMENTS"
109111

110112
exit

bin/v-add-letsencrypt-domain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# Argument definition
1616
user=$1
17-
domain=$(idn -t --quiet -a "$2" )
17+
domain=$2
1818
aliases=$3
1919
mail=${4// }
2020

@@ -118,7 +118,7 @@ check_hestia_demo_mode
118118
if [ ! -z "$mail" ]; then
119119
root_domain=$domain
120120
domain="mail.$root_domain"
121-
webmail=$(get_object_value "mail" "$domain" '$WEBMAIL');
121+
webmail=$(get_object_value "mail" "DOMAIN" "$root_domain" '$WEBMAIL');
122122
if [ ! -z "$webmail" ]; then
123123
aliases="$WEBMAIL_ALIAS.$root_domain"
124124
fi

bin/v-add-mail-account

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

1515
# Argument definition
1616
user=$1
17-
domain=$(idn -t --quiet -a "$2" )
17+
domain=$2
1818
account=$3
1919
password=$4; HIDE=4
2020
quota=${5-unlimited}

bin/v-add-mail-account-alias

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
# Argument definition
1616
user=$1
17-
domain=$(idn -t --quiet -a "$2" )
17+
domain=$2
18+
domain_idn=$2
1819
account=$3
1920
malias=$4
2021

@@ -26,6 +27,8 @@ source $HESTIA/conf/hestia.conf
2627
# Additional argument formatting
2728
format_domain
2829
format_domain_idn
30+
# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
31+
2932

3033
#----------------------------------------------------------#
3134
# Verifications #

0 commit comments

Comments
 (0)