Skip to content

Commit 2588413

Browse files
authored
Merge pull request hestiacp#3 from hestiacp/master
Sync fork with master
2 parents 16e41ab + 4587a64 commit 2588413

File tree

128 files changed

+5259
-1488
lines changed

Some content is hidden

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

128 files changed

+5259
-1488
lines changed

CHANGELOG.md

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,60 @@ All notable changes to this project will be documented in this file.
33

44
## [CURRENT] - Development
55
### Features
6+
- Added support for configuring individual TTL per DNS record. Thanks to @jaapmarcus
7+
8+
### Bugfixes
9+
- Disable Apache2 Server Status Module by default.
10+
- Do not allow to change the password of a non-hestia user. Thanks to Alexandre Zanni!
11+
- Use sury repository for Apache2 packages.
12+
- Check whether Nginx, Apache2 and MariaDB are selected for installation prior to adding third party repositories.
13+
- Remove duplicated set-cookie line in default fpm config.
14+
- Adjust let's encrypt validation check for idn domains, thanks to @zanami!
15+
- Set backup download location on restore for ftp/sftp, thanks to @Daniyal-Javani!
16+
- Ignore empty lines when listing firewall rules.
17+
- Changing email account password would fail when similar account names are found.
18+
- Preserve email quota when (un)suspending and rebuilding mail account.
19+
- Cleanup temporary file after running v-list-sys-services.
20+
- Don't calculate /home folder size in v-list-sys-info.
21+
- Cleanup temporary files when uploading custom SSL cert from WebUi.
22+
- Cleanup temporary files when adding/renewing letsencrypt SSL cert.
23+
24+
## [1.1.1] - 2020-03-24 - Hotfix
25+
### Features
26+
- No new features introduced with v1.1.1, this is strictly a security/bug fix release.
27+
28+
### Bugfixes
29+
- Fixed phpMyAdmin blowfish and tmp directory issues.
30+
- Added additional verification of host domain in password reset. Thanks to @FalzoMAD and @mmetince!
31+
- Fixed issue with rc.local not executing properly.
32+
- Rework of Let's Encrypt routine to use progressive delay between validation retries.
33+
- Fixed syntax issue in v-list-sys-db-status which prevented main functions from loading.
34+
- Removed /home size reporting when running v-list-sys-info due to performance issues.
35+
- Updated installer to use Ubuntu key server for Hestia APT repository.
36+
- Fixed duplicate demo mode check in v-change-user-password.
37+
38+
## [1.1.0] - 2020-03-11 - Major Release (Feature / Quality Update)
39+
### Features
640
- Added support for custom user interface themes.
7-
- Adjusted default font size for improved readability.
8-
- Added read only/demo mode function if DEMO_MODE is set to yes in hestia.conf.
41+
- Introduced official Dark and Flat themes.
42+
- Added read-only/demo mode - DEMO_MODE must be set to yes in hestia.conf to enable.
943
- Added php-imagick module to installer and upgrade scripts.
1044
- Added recidive filter function to fail2ban.
11-
- Refactored MultiPHP functionality. MultiPHP will be enabled by default on new installations.
12-
- Allowed admin user to add or remove PHP versions from webui (edit/server->"Web Server" page).
45+
- Improved and refactored Multi-PHP functionality.
46+
- Multi-PHP will be enabled by default on new installations.
47+
- Allow admin user to add/remove PHP versions from Web UI (Server -> Configure -> Web Server).
1348
- Extended v-extract-fs-archive to allow archive testing and extracting only specific paths (for tar)
1449
- Allow renaming of existing packages from console (v-rename-package).
15-
- Webmail IP address is now inherited from web domain when using multiple IPs.
16-
- Exim now uses the web domain IP if it exists.
17-
- Public IP is now used when updating webmail DNS record.
18-
- Added PHP 7.4 to MultiPHP.
19-
- Add Support for Debian 10 (Buster).
50+
- Added PHP 7.4 to Multi-PHP.
51+
- Addded official support for Debian 10 (Buster).
2052

2153
### Bugfixes
2254
- Added a detection of web root for add .well-known ACME challenge.
2355
- Reworked Let's Encrypt ACME staging to use Hestia code standards.
2456
- Fixed issues with incorrect font rendering on Windows and Linux.
2557
- Fixed issues with Let's Encrypt - use Nginx for Let's Encrypt ACME request if present.
26-
- Reworked v-add-sys-ip, removed CentOS/Red Hat support and reworked conditions.
58+
- Reworked v-add-sys-ip, removed deprecated CentOS/Red Hat code and reworked conditions.
2759
- Enabled HSTS and force SSL on v-add-letsencrypt-host.
28-
- Prevented login action for webmail in list user view.
2960
- Removed hardcoded mail in HELO data (cosmetic fix).
3061
- Fixed SFTP server validation check - thanks @dbannik.
3162
- Implemented security warning message when creating web domains with the default admin account.
@@ -57,18 +88,23 @@ All notable changes to this project will be documented in this file.
5788
- Fixed MultiPHP upgrade script to update all web templates.
5889
- Fixed report issue link in installer scripts.
5990
- Fixed database user authentification on backup restore.
60-
- Added robots.txt for roundcube webmail to prevent search bot crawling.
91+
- Added robots.txt for Roundcube webmail to prevent search bot crawling.
6192
- Re-Enable force ssl function on let's encrypt certification renew.
62-
- Added official postgresql repository to be up to date.
93+
- Added official PostgreSQL repository so system stays up-to-date with latest available upstream packages.
6394
- Hardening MySQL configuration, prevent local infile.
6495
- Fixed lograte bug and cleans up the messed up nginx/apache2 log permissions.
6596
- Fixed IfModule mpm_itk.c for apache2 templates.
66-
- Added mpm_itk for Deb10 single php installation only.
67-
- Hardening nginx configuration, drop TLSv1.1 support.
97+
- Added mpm_itk for Debian 10 (non Multi-PHP installations only.)
98+
- Hardening nginx configuration, dropped support for TLSv1.1.
6899
- Fixed excluding folders named "logs" from restore backup, thanks to @davidgolsen.
69100
- Fixed typo in delete psql database part, thanks to @joshbmarshall.
70101
- Split long txt records to 255 chunks to prevent bind issues, thanks to @setiseta.
71102
- Fixed missing restart routine for vsftp on v-add-letsencrypt-host.
103+
- Show amount of disk space consumed by /home when running v-list-sys-info.
104+
- Remove broken /webmail alias from previous versions.
105+
- Webmail IP address is now inherited from web domain when using multiple IPs.
106+
- Exim now uses the web domain IP if it exists.
107+
- Fix incorrect MX record for DNS domains using the Office 365 template.
72108

73109
## [1.0.6] - 2019-09-24 - Hotfix
74110
### Bugfixes

ISSUE_TEMPLATE.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
### The content below is simply a template.
1+
### Please fill in the relevant sections below and remove those which do not apply.
22

3-
**To better assist in troubleshooting and aid with our debugging processes, we ask that you please delete any unnecessary sections below when filling out your issue report.**
3+
**To help aid our developers in debugging your issue we ask that you include as much information as possible, including the configuration of your server and troubleshooting steps already performed.**
44

5-
**Important: Please DO NOT include any personal or sensitive information in your issue reports, including usernames, passwords, or email addresses.**
5+
**Please DO NOT include any personal or sensitive information in your issue reports, including usernames or passwords!**
6+
7+
===
68

79
### In a few words, please describe the issue that you're experiencing:
8-
Please enter your response here (e.g. When I try adding a web domain, an error message appeared stating that the php-fpm pool did not exist).
10+
Please enter your answer here (e.g. When I try adding a web domain, an error message appeared stating that the php-fpm pool did not exist).
911

1012
### What steps did you take when the issue occured?
1113
1. Ex.: Log into the Hestia Control Panel using Firefox
@@ -14,22 +16,25 @@ Please enter your response here (e.g. When I try adding a web domain, an error m
1416
4. Ex.: Attempted to add a domain and received an error.
1517

1618
### Expected behavior:
17-
Please enter your response here (e.g. the web domain should have been added successfully).
19+
Please enter your answer here (e.g. the web domain should have been added successfully).
20+
21+
### Does this issue always occur, or is it intermittent?
22+
Please enter your answer here (e.g. it happens every time I try to perform the steps above).
1823

1924
### Operating system distribution and release:
20-
Please enter your response here (e.g. Ubuntu 18.04.3 LTS)
25+
Please enter your answer here (e.g. Ubuntu 18.04.3 LTS)
2126

2227
### Which version of Hestia Control Panel is currently installed?
2328
You can find this information in $HESTIA/conf/hestia.conf by running the following command:
2429
`grep VERSION $HESTIA/conf/hestia.conf`
2530

26-
Please enter your response here (e.g. 1.0.6)
31+
Please enter your answer here (e.g. 1.1.0)
2732

2833
### Which branch are you using?
29-
Please enter your response here (e.g release, master, etc.)
34+
Please enter your answer here (e.g release, master, etc.)
3035

3136
### When did this issue occur? After a clean installation, or after an upgrade?
32-
Please enter your response here (e.g the feature stopped working after upgrading to the latest release)
37+
Please enter your answer here (e.g the feature stopped working after upgrading to the latest release)
3338

3439
**Note:** If you have upgraded from an older release on an existing server, please let us know which version was previously installed if at all possible.
3540

@@ -40,13 +45,6 @@ Please enter your response here (e.g the feature stopped working after upgrading
4045
- PHP-FPM + Multi-PHP
4146
- Other (please specify)
4247

43-
### Which of the following server roles are installed on your server?
44-
- DNS
45-
- Mail (Dovecot + Exim)
46-
- Mail (Exim only)
47-
- MySQL (MariaDB)
48-
- PostgreSQL
49-
5048
### In order to better assist, please post any relevant log information below:
5149
Tip: Most log files can be found under ***/var/log/***.
5250

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[Hestia Control Panel](https://www.hestiacp.com/)
22
==================================================
3-
**Current stable release:** Version 1.0.6, released on September 26th, 2019.<br>
4-
**Current development release:** Version 1.1.0, release date yet to be determined.
3+
**Current stable release:** Version 1.1.1, released on March 26th, 2020.<br>
4+
**Current development release:** Version 1.1.2.
5+
<br><br>
6+
**Due to a change of the repository infrastructure, please install the new key before you upgrade your existing installations:**
7+
```bash
8+
wget -qO - https://gpg.hestiacp.com/deb_signing.key | sudo apt-key add -
9+
```
510

611
**Welcome!**
712
----------------------------
@@ -29,15 +34,15 @@ What does Hestia Control Panel support?
2934
----------------------------
3035
* Standard Web Server (Apache/NGINX) with PHP
3136
* PHP Web Application Server (NGINX + PHP-FPM)
32-
* Multiple PHP versions (5.6 - 7.3)
37+
* Multiple PHP versions (5.6 - 7.4, with 7.3 currently as default for optimal compatibility)
3338
* DNS Server (Bind) with clustering capabilities
3439
* Mail Server (Exim/Dovecot) with Anti-Virus and Anti-Spam (ClamAV and SpamAssassin)
3540
* Database functionality (MariaDB/PostgreSQL)
3641
* Let's Encrypt SSL with wildcard certificates
3742

3843
Supported operating systems:
3944
----------------------------
40-
* Debian 8 or 9
45+
* Debian 8, 9, 10
4146
* Ubuntu 16.04 LTS or Ubuntu 18.04 LTS (the latest LTS release is recommended)
4247
* **NOTE:** Hestia Control Panel must be installed on top of a fresh operating system installation to ensure proper functionality.
4348

@@ -116,3 +121,15 @@ If you would like to help our developers cover their time and infrastucture cost
116121
License
117122
=============================
118123
Hestia Control Panel is licensed under [GPL v3](https://github.com/hestiacp/hestiacp/blob/master/LICENSE) license, and is based on the [VestaCP](https://www.vestacp.com/) project.<br>
124+
125+
Copyright
126+
=============================
127+
"Hestia Control Panel", "HestiaCP", and the Hestia logo are original copyright of hestiacp.com and the following restrictions apply:
128+
129+
**You are allowed to:**
130+
- use the names "Hestia Control Panel", "HestiaCP", or the Hestia logo in any context directly related to the application or the project. This includes the application itself, local communities and news or blog posts.
131+
132+
**You are not allowed to:**
133+
- sell or redistribute the application under the name "Hestia Control Panel", "HestiaCP", or similar derivatives, including the use of the Hestia logo in any brand or marketing materials related to revenue generating activities,
134+
- use the names "Hestia Control Panel", "HestiaCP", or the Hestia logo in any context that is not related to the project,
135+
- alter the name "Hestia Control Panel", "HestiaCP", or the Hestia logo in any way.

SECURITY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
If you have discovered a vulnerability in Hestia Control Panel,
6+
let our development team know via e-mail at info@hestiacp.com and
7+
we will respond as soon as possible.

bin/v-add-dns-record

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: add dns record
3-
# options: USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART]
3+
# options: USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART] [TTL]
44
#
55
# The call is used for adding new DNS record. Complex records of TXT, MX and
66
# SRV types can be used by a filling in the 'value' argument. The function also
@@ -23,6 +23,8 @@ dvalue=$(idn -t --quiet -u "$5" )
2323
priority=$6
2424
id=$7
2525
restart=$8
26+
ttl=$9
27+
2628
if [ -z "$priority" ]; then
2729
priority=10
2830
fi
@@ -69,7 +71,7 @@ format_domain_idn
6971
# Verifications #
7072
#----------------------------------------------------------#
7173

72-
check_args '5' "$#" 'USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART]'
74+
check_args '5' "$#" 'USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART] [TTL]'
7375
is_format_valid 'user' 'domain' 'record' 'rtype' 'dvalue'
7476
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
7577
is_object_valid 'user' 'USER' "$user"
@@ -82,6 +84,7 @@ is_format_valid 'id'
8284
is_object_new "dns/$domain" 'ID' "$id"
8385
is_dns_fqnd "$rtype" "$dvalue"
8486
is_dns_nameserver_valid "$domain" "$rtype" "$dvalue"
87+
is_format_valid 'ttl'
8588

8689
# Perform verification if read-only mode is enabled
8790
check_hestia_demo_mode
@@ -100,7 +103,8 @@ date=$(echo "$time_n_date" |cut -f 2 -d \ )
100103
zone="$USER_DATA/dns/$domain.conf"
101104
dns_rec="ID='$id' RECORD='$record' TYPE='$rtype' PRIORITY='$priority'"
102105
dns_rec="$dns_rec VALUE='$dvalue' SUSPENDED='no' TIME='$time' DATE='$date'"
103-
echo "$dns_rec" >> $zone
106+
[ ! -z "$ttl" ] && dns_rec="$dns_rec TTL='$ttl'"
107+
echo "$dns_rec" >> $zone;
104108
chmod 660 $zone
105109

106110
# Sorting records

bin/v-add-firewall-chain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ case $chain in
6262
WEB) port='80,443'; protocol=TCP ;;
6363
DB) port='3306,5432'; protocol=TCP ;;
6464
HESTIA) port=$hestiaport; protocol=TCP ;;
65+
RECIDIVE) port='1:65535'; protocol=TCP ;;
6566
*) check_args '2' "$#" 'CHAIN PORT' ;;
6667
esac
6768

bin/v-add-letsencrypt-domain

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ fi
134134
# Check if dns records exist for requested domain/aliases
135135
if [ "$proto" = "http-01" ]; then
136136
for identifier in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
137-
if ! nslookup "${identifier}" >/dev/null 2>&1 ; then
137+
if [[ "$identifier" = *[![:ascii:]]* ]]; then
138+
identifier=$(idn -t --quiet -a $identifier)
139+
fi
140+
if ! nslookup "${identifier}" > /dev/null 2>&1 ; then
138141
check_result $E_NOTEXIST "DNS record for $identifier doesn't exist"
139142
fi
140143
done
@@ -285,6 +288,7 @@ for auth in $authz; do
285288
validation='valid'
286289
else
287290
validation='pending'
291+
sleep 5
288292
fi
289293

290294
# Doing pol check on status
@@ -326,7 +330,7 @@ for auth in $authz; do
326330
fi
327331
check_result $E_CONNECT "Let's Encrypt domain validation timeout"
328332
fi
329-
sleep 1
333+
sleep $((i*2))
330334
done
331335
if [ "$validation" = 'invalid' ]; then
332336
# Delete DNS CAA record
@@ -339,7 +343,7 @@ for auth in $authz; do
339343
$BIN/v-delete-dns-record $user $domain $caa_record
340344
fi
341345
fi
342-
fi
346+
fi
343347
check_result $E_CONNECT "Let's Encrypt domain verification failed"
344348
fi
345349
done
@@ -356,13 +360,15 @@ nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
356360
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
357361
certificate=$(echo "$answer"|grep 'certificate":' |cut -f4 -d '"')
358362
if [[ "$status" -ne 200 ]]; then
363+
[ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
359364
check_result $E_CONNECT "Let's Encrypt finalize bad status $status"
360365
fi
361366

362367
# Downloading signed certificate / STEP 7
363368
answer=$(query_le_v2 "$certificate" "" "$nonce" "$ssl_dir/$domain.pem")
364369
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
365370
if [[ "$status" -ne 200 ]]; then
371+
[ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
366372
check_result $E_NOTEXIST "Let's Encrypt downloading signed cert failed status:$status"
367373
fi
368374

@@ -399,11 +405,12 @@ if [ -z "$mail" ]; then
399405
[[ "$ssl_force" = "yes" ]] && $BIN/v-add-web-domain-ssl-force $user $domain > /dev/null 2>&1
400406
else
401407
ssl_enabled="$(get_object_value 'mail' 'DOMAIN' "$root_domain" '$SSL')"
402-
[[ "$ssl_enabled" = "yes" ]] && $BIN/v-delete-mail-domain-ssl $user $root_domain >/dev/null 2>&1
408+
[[ "$ssl_enabled" = "yes" ]] && $BIN/v-delete-mail-domain-ssl $user $root_domain > /dev/null 2>&1
403409
$BIN/v-add-mail-domain-ssl $user $root_domain $ssl_dir
404410
fi
405411

406412
if [ "$?" -ne '0' ]; then
413+
[ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
407414
touch $HESTIA/data/queue/letsencrypt.pipe
408415
sed -i "/ $domain /d" $HESTIA/data/queue/letsencrypt.pipe
409416
send_notice 'LETSENCRYPT' "$domain certificate installation failed"
@@ -422,20 +429,27 @@ fi
422429
if [ -z "$mail" ]; then
423430
if [ -z "$LETSENCRYPT" ]; then
424431
add_object_key "web" 'DOMAIN' "$domain" 'LETSENCRYPT' 'FTP_USER'
432+
add_object_key "web" 'DOMAIN' "$domain" 'LETSENCRYPT_FAIL_COUNT' 'LETSENCRYPT'
425433
fi
426434
update_object_value 'web' 'DOMAIN' "$domain" '$LETSENCRYPT' 'yes'
435+
update_object_value 'web' 'DOMAIN' "$domain" '$LETSENCRYPT_FAIL_COUNT' "0"
427436
else
428437
if [ -z "$LETSENCRYPT" ]; then
429438
add_object_key "mail" 'DOMAIN' "$root_domain" 'LETSENCRYPT'
439+
add_object_key "mail" 'DOMAIN' "$root_domain" 'LETSENCRYPT_FAIL_COUNT' 'LETSENCRYPT'
430440
fi
431441
update_object_value 'mail' 'DOMAIN' "$root_domain" '$LETSENCRYPT' 'yes'
442+
update_object_value 'mail' 'DOMAIN' "$root_domain" '$LETSENCRYPT_FAIL_COUNT' "0"
432443
fi
433444

434445
# Remove challenge folder if exist
435446
if [ ! -z "$well_known" ]; then
436447
rm -fr $well_known
437448
fi
438449

450+
# Remove temporary SSL folder
451+
[ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
452+
439453
#----------------------------------------------------------#
440454
# Hestia #
441455
#----------------------------------------------------------#

bin/v-add-web-domain-ssl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
109109
add_web_config "$PROXY_SYSTEM" "$PROXY.stpl"
110110
fi
111111

112-
113112
#----------------------------------------------------------#
114113
# Hestia #
115114
#----------------------------------------------------------#
@@ -121,6 +120,9 @@ increase_user_value "$user" '$U_WEB_SSL'
121120
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
122121
update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
123122

123+
# Enabling automatic SSL redirection
124+
$BIN/v-add-web-domain-ssl-force "$user" "$domain"
125+
124126
# Restarting web server
125127
$BIN/v-restart-web $restart
126128
check_result $? "Web restart failed" >/dev/null

0 commit comments

Comments
 (0)