Skip to content

Commit 638be8c

Browse files
committed
Merge branch 'main' into feature/debian_11_support
2 parents 686359d + 32f3a6a commit 638be8c

File tree

136 files changed

+4937
-4315
lines changed

Some content is hidden

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

136 files changed

+4937
-4315
lines changed

.drone.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
kind: pipeline
3+
type: ssh
4+
name: HestiaCP + Nginx + Apache2
5+
6+
concurrency:
7+
limit: 1
8+
9+
server:
10+
host:
11+
from_secret: server_address
12+
user:
13+
from_secret: username
14+
ssh_key:
15+
from_secret: ssh_key
16+
17+
platform:
18+
os: linux
19+
arch: amd64
20+
21+
steps:
22+
- name: Download submodules
23+
image: alpine/git
24+
commands:
25+
- git submodule update --init --recursive
26+
- name: Build Hestia package and install
27+
commands:
28+
- ./src/hst_autocompile.sh --hestia --install '~localsrc'
29+
- name: Run system / user tests
30+
commands:
31+
- bats ./test/test.bats
32+
- name: Run restore tests
33+
commands:
34+
- bats ./test/restore.bats
35+
- name: Run config tests
36+
commands:
37+
- bats ./test/config-tests.bats
38+
- name: Run Check PHP
39+
commands:
40+
- ./test/check_php.sh
41+
42+
trigger:
43+
event: [ push, pull_request ]
44+
45+
---
46+
kind: pipeline
47+
type: ssh
48+
name: HestiaCP + Nginx
49+
50+
concurrency:
51+
limit: 1
52+
53+
server:
54+
host:
55+
from_secret: server_address2
56+
user:
57+
from_secret: username
58+
ssh_key:
59+
from_secret: ssh_key
60+
61+
platform:
62+
os: linux
63+
arch: amd64
64+
65+
steps:
66+
- name: Download submodules
67+
image: alpine/git
68+
commands:
69+
- git submodule update --init --recursive
70+
- name: Build Hestia package install
71+
commands:
72+
- ./src/hst_autocompile.sh --hestia --install '~localsrc'
73+
- name: Run system / user tests
74+
commands:
75+
- bats ./test/test.bats
76+
- name: Run restore tests
77+
commands:
78+
- bats ./test/restore.bats
79+
- name: Run config tests
80+
commands:
81+
- bats ./test/config-tests.bats
82+
- name: Run Check PHP
83+
commands:
84+
- ./test/check_php.sh
85+
86+
trigger:
87+
event: [ push, pull_request ]
88+
89+
---
90+
kind: signature
91+
hmac: bca7f80ac6198662bc658235d7345485213847f1c00f027e1439775e02776bc7

CHANGELOG.md

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

4+
## [Development]
5+
6+
### Features
7+
8+
### Bugfixes
9+
10+
- Improve handling upgrade of Roundcube #1917
11+
12+
## [1.4.10] - Service release
13+
14+
### Features
15+
16+
- Added v-delete-firewall-ban ip all #2031
17+
- Include config tests for nginx/apache2 templates
18+
19+
### Bugfixes
20+
21+
- Fixed UI issues after upgrade jQuery + jQuery UI to last version (#2021 and #2032) + [forum](https://forum.hestiacp.com/t/confusion-about-send-welcome-email-checkbox/4259/11)
22+
- Fixed security issues in caching templates of Nginx when used as Reverse Proxy
23+
- Fixed an issue with deleting multiple mail accounts (#2047)
24+
- Fixed an issue with phpmailer + non latin characters (#2050) thanks @Faymir
25+
26+
## [1.4.9] - Service release
27+
28+
### Bugfixes
29+
30+
- Updated jQuery and jQuery UI to the latest version due to a vulnerability in jQuery. @dependabot
31+
- Fixed bug in /etc/dovecot/conf.d/10-ssl.conf for new installs
32+
- Fixed bug with notifications
33+
- Fixed translation string @myrevery
34+
35+
## [1.4.8] - Service release
36+
37+
### Features
38+
39+
- Add support for automated testing for HestiaCP code with @drone
40+
- Add support for SMTP server for internal email #1988 @Myself5 / #1165
41+
42+
### Bugfixes
43+
44+
- Updated jQuery and jQuery UI to the latest version due to a vulnerability in jQuery. @dependabot
45+
- Resolve issue with double ENFORCE_SUBDOMAIN_OWNERSHIP keys in hestia.conf
46+
- Resolve issue with create new user during install in some cases #2000
47+
- Fixed an issue with Quick Install apps named Test123 (@PsychotherapistSam)
48+
- Fix an issue with dovecot 2.3 ssl config (#1432)
49+
- Load $HESTIA path during upgrade script (#1698)
50+
- Remove TLS 1.1 from Proftpd config (#950)
51+
- Don't remove postfix when Exim is not installed (#1995)
52+
- Fix a bug in no-php Nginx FPM template (##2007)
53+
- Update German translations
54+
- Fixed a few minor error in Mail DMS records (#2005)
55+
56+
457
## [1.4.7] - Service release
558

659
### Bugfixes
760

8-
- Fix #1984 phppgadmin not working on apache2 systems
9-
- Fix #1985 Restart service not working
61+
- Fixed #1984 phppgadmin not working on apache2 systems
62+
- Fixed #1985 Restart service not working
1063

1164

1265
## [1.4.6] - Service release
@@ -19,18 +72,18 @@ All notable changes to this project will be documented in this file.
1972

2073
### Bugfixes
2174

22-
- Fix #1961 Renewal Apache2 only SSL certificate fails
75+
- Fixed #1961 Renewal Apache2 only SSL certificate fails
2376
- Fixed #1956 to prevent reset of defined webmail client.
2477
- Explicitly disable cron reports #1978
2578
- Fixed an issue where in rare cases certificate failed to install @dpeca and @myvesta
2679
- Fixed an issue where composer failed to install when .composer folder is missing
27-
- Fix #1980 Lets Encrypt Auto Renewal Reverts Webmail Client back to Roundcube
80+
- Fixed #1980 Lets Encrypt Auto Renewal Reverts Webmail Client back to Roundcube
2881

2982
## [1.4.5] - Service release
3083

3184
### Bugfixes
3285

33-
- Revert #1943 and rework it to fix possible errors occuring on v-rebuild-cron-jobs.
86+
- Revert #1943 and rework it to fix possible errors occurring on v-rebuild-cron-jobs.
3487
- Fixed #1956 to prevent reset of defined webmail client.
3588
- Explicitly disable cron reports #1978
3689

@@ -45,15 +98,15 @@ All notable changes to this project will be documented in this file.
4598
### Bugfixes
4699

47100
- Add template for when webmail is disabled allowing to generate SSL.
48-
- Fix PHP bug in /list/log/
49-
- Fix issue with time in /list/services as it was showing as 50 minute1 instead of minutes
50-
- Add missing back buttons + fix behavoir of back buttons on login page.
101+
- Fixed PHP bug in /list/log/
102+
- Fixed issue with time in /list/services as it was showing as 50 minute1 instead of minutes
103+
- Add missing back buttons + fix behaviour of back buttons on login page.
51104
- Set "default" when WEB_TEMPLATE and PROXY_TEMPLATE is missing in user.conf
52105
- Add BACKEND_TEMPLATE to default package
53-
- Fix possible error occur for v-rebuild-cron-jobs #1943 (thanks @clarkchentw)
54-
- Restrict access Filemanager when SSH is enabled for the user (@bet0x)
106+
- Fixed possible error occur for v-rebuild-cron-jobs #1943 (thanks @clarkchentw)
107+
- Restrict access file manager when SSH is enabled for the user (@bet0x)
55108
- Check for DNS domains when running v-change-sys-ip-nat (@clarkchentw)
56-
- Fix logical error in installer (@clarkchentw)
109+
- Fixed logical error in installer (@clarkchentw)
57110

58111
## [1.4.3] - Service release
59112

@@ -99,10 +152,10 @@ Then run the update via
99152

100153
### Bugfixes
101154

102-
- Fix issue wit startup script for iptables / network (#1849) (@myrevery)
103-
- Fix problem with accidentally replacing nginx.conf during upgrade nginx (#1878 / @myrevery)
104-
- Fix issue with installing Ubuntu 18.04
105-
- Fix issue with login into file manger as admin user
155+
- Fixed issue wit startup script for iptables / network (#1849) (@myrevery)
156+
- Fixed problem with accidentally replacing nginx.conf during upgrade nginx (#1878 / @myrevery)
157+
- Fixed issue with installing Ubuntu 18.04
158+
- Fixed issue with login into file manger as admin user
106159
- Added proxy_extentions back to support older custom templates
107160
- Added the possibility to skip the forced reboot when interactive is set to no
108161
- Fixed an issue with modx template
@@ -539,17 +592,17 @@ Then run the update via
539592
- Remove broken /webmail alias from previous versions.
540593
- Webmail IP address is now inherited from web domain when using multiple IPs.
541594
- Exim now uses the web domain IP if it exists.
542-
- Fix incorrect MX record for DNS domains using the Office 365 template.
595+
- Fixed incorrect MX record for DNS domains using the Office 365 template.
543596

544597
## [1.0.6] - 2019-09-24 - Hotfix
545598
### Bugfixes
546599
- Add support for HTTP/2 Let's Encrypt Server.
547600

548601
## [1.0.5] - 2019-08-06 - Hotfix
549602
### Bugfixes
550-
- Fix several security issues, thanks to Andrea Cardaci (https://cardaci.xyz/)
603+
- Fixed several security issues, thanks to Andrea Cardaci (https://cardaci.xyz/)
551604
- Rework Let's Encrypt ACME staging to use hestia conform standard.
552-
- Fix if condition, use nginx for Let's Encrypt ACME request if present.
605+
- Fixed if condition, use nginx for Let's Encrypt ACME request if present.
553606

554607
## [1.0.4] - 2019-07-09 - Hotfix
555608
### Bugfixes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
[Hestia Control Panel](https://www.hestiacp.com/)
44
==================================================
5-
**Latest stable release:** Version 1.4.7 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
5+
**Latest stable release:** Version 1.4.10 | [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>
99
**Forums:** [forum.hestiacp.com](https://forum.hestiacp.com/)<br>
1010
**Discord:** [Join the discussion](https://discord.gg/nXRUZch)<br />
11-
<br>
11+
<br><br>
1212
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ST87LQH2CHGLA)
1313
<br>
1414

bin/v-add-database

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ is_object_unsuspended "../../../conf/$type" 'DBHOST' "$host"
5858
#is_charset_valid
5959
is_package_full 'DATABASES'
6060
is_password_valid
61+
62+
if [ "$type" = "pgsql" ]; then
63+
exclude="-"
64+
if [[ "$dbuser" =~ $exclude ]]; then
65+
check_result $E_INVALID "invalid database user format"
66+
fi
67+
if [[ "$database" =~ $exclude ]]; then
68+
check_result $E_INVALID "invalid database format"
69+
fi
70+
fi
71+
6172
dbpass="$password"
6273

6374
# Perform verification if read-only mode is enabled

bin/v-add-mail-domain-ssl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fi
7878
# Call routine to add SSL configuration to mail domain
7979
add_mail_ssl_config
8080

81-
if [ "$webmail" == "roundcube" ]; then
81+
if [ "$WEBMAIL" == "roundcube" ]; then
8282
WEBMAIL_TEMPLATE="default"
8383
if [ ! -z "$PROXY_SYSTEM" ]; then
8484
PROXY_TEMPLATE="default"
@@ -88,7 +88,7 @@ if [ "$webmail" == "roundcube" ]; then
8888
if [ "$WEB_SYSTEM" = "nginx" ]; then
8989
WEBMAIL_TEMPLATE="web_system"
9090
fi
91-
elif [ "$webmail" == "rainloop" ]; then
91+
elif [ "$WEBMAIL" == "rainloop" ]; then
9292
WEBMAIL_TEMPLATE="rainloop"
9393
if [ ! -z "$PROXY_SYSTEM" ]; then
9494
PROXY_TEMPLATE="default_rainloop"

bin/v-add-mail-domain-webmail

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ webmail=$3
2020
restart="$4"
2121
quiet=$5
2222

23+
if [ -z "$restart" ]; then
24+
restart="yes"
25+
fi
26+
2327
# Additional argument formatting
2428
if [[ "$domain" =~ [[:upper:]] ]]; then
2529
domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]')

bin/v-add-sys-phpmailer

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#!/bin/bash
2+
# info: add PHPMailer functionality to Hestia Control Panel
3+
# options: [MODE]
4+
# labels: hestia
5+
#
6+
# The function installs PHPMailer for Server sided email communication
7+
8+
#----------------------------------------------------------#
9+
# Variable&Function #
10+
#----------------------------------------------------------#
11+
12+
# Includes
13+
# shellcheck source=/usr/local/hestia/func/main.sh
14+
source $HESTIA/func/main.sh
15+
# shellcheck source=/usr/local/hestia/conf/hestia.conf
16+
source $HESTIA/conf/hestia.conf
17+
# shellcheck source=/usr/local/hestia/install/upgrade/upgrade.conf
18+
source $HESTIA/install/upgrade/upgrade.conf
19+
20+
MODE=$1
21+
user="admin"
22+
23+
PM_INSTALL_DIR="$HESTIA/web/inc"
24+
COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
25+
26+
27+
#----------------------------------------------------------#
28+
# Verifications #
29+
#----------------------------------------------------------#
30+
31+
# Checking root permissions
32+
if [ "x$(id -u)" != 'x0' ]; then
33+
echo "ERROR: v-add-sys-phpmailer can be run executed only by root user"
34+
exit 10
35+
fi
36+
37+
# Ensure that $HESTIA (/usr/local/hestia/) and other variables are valid.
38+
if [ -z "$HESTIA" ]; then
39+
HESTIA="/usr/local/hestia"
40+
fi
41+
42+
if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then
43+
echo "ERROR: Environment variables not present, installation aborted."
44+
exit 2
45+
fi
46+
47+
# Ensure that Composer is installed for the user before continuing as it is a dependency of the PHPMailer.
48+
if [ ! -f "$COMPOSER_BIN" ]; then
49+
$BIN/v-add-user-composer "$user"
50+
if [ $? -ne 0 ]; then
51+
$BIN/v-add-user-notification admin 'Composer installation failed!' '<b>PHPMailer will not work without Composer.</b><br><br>Please try running the installer manually from a shell session:<br>v-add-sys-phpmailer<br><br>If this continues, open an issue report on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
52+
exit 1
53+
fi
54+
fi
55+
56+
# Perform verification if read-only mode is enabled
57+
check_hestia_demo_mode
58+
59+
#----------------------------------------------------------#
60+
# Action #
61+
#----------------------------------------------------------#
62+
63+
cd "$PM_INSTALL_DIR"
64+
rm --recursive --force ${PM_INSTALL_DIR}/vendor
65+
mkdir -p ${PM_INSTALL_DIR}/vendor
66+
chown $user: -R ${PM_INSTALL_DIR}/vendor
67+
68+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
69+
70+
# Check if installation was successful, if not abort script and throw error message notification and clean-up
71+
if [ $? -ne 0 ]; then
72+
echo "ERROR: PHPMailer installation failed!"
73+
echo "Please report this to our development team:"
74+
echo "https://github.com/hestiacp/hestiacp/issues"
75+
$BIN/v-add-user-notification admin 'PHPMailer installation failed!' 'Please report this to our development team on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
76+
# Installation failed, clean up files
77+
rm --recursive --force ${PM_INSTALL_DIR}/vendor
78+
$BIN/v-change-sys-config-value 'USE_SERVER_SMTP' 'n'
79+
$BIN/v-log-action "system" "Error" "Plugins" "PHPMailer installation failed (Version: $pm_v)."
80+
exit 1
81+
fi
82+
83+
# Set permissions
84+
chown root: -R "${PM_INSTALL_DIR}/vendor"
85+
86+
#----------------------------------------------------------#
87+
# Logging #
88+
#----------------------------------------------------------#
89+
90+
$BIN/v-log-action "system" "Info" "Plugins" "PHPMailer enabled (Version: $pm_v)."
91+
log_event "$OK" "$ARGUMENTS"

0 commit comments

Comments
 (0)