Skip to content

Commit b8711be

Browse files
committed
Merge branch 'main' into release
2 parents 1ef8cfc + 99b0ee8 commit b8711be

File tree

113 files changed

+4526
-4159
lines changed

Some content is hidden

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

113 files changed

+4526
-4159
lines changed

.drone.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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 Bats
30+
commands:
31+
- bats ./test/test.bats
32+
- bats ./test/restore.bats
33+
- name: Run Check PHP
34+
commands:
35+
- ./test/check_php.sh
36+
37+
trigger:
38+
event: [ push, pull_request ]
39+
40+
---
41+
kind: pipeline
42+
type: ssh
43+
name: HestiaCP + Nginx
44+
45+
concurrency:
46+
limit: 1
47+
48+
server:
49+
host:
50+
from_secret: server_address2
51+
user:
52+
from_secret: username
53+
ssh_key:
54+
from_secret: ssh_key
55+
56+
platform:
57+
os: linux
58+
arch: amd64
59+
60+
steps:
61+
- name: Download submodules
62+
image: alpine/git
63+
commands:
64+
- git submodule update --init --recursive
65+
- name: Build Hestia package install
66+
commands:
67+
- ./src/hst_autocompile.sh --hestia --install '~localsrc'
68+
- name: Run Bats
69+
commands:
70+
- bats ./test/test.bats
71+
- bats ./test/restore.bats
72+
- name: Run Check PHP
73+
commands:
74+
- ./test/check_php.sh
75+
76+
trigger:
77+
event: [ push, pull_request ]
78+
79+
---
80+
kind: signature
81+
hmac: f3763c63fcebe50a2ad24dc3fb2ab3191cba15750e4dd80be82cea87466d96bc

CHANGELOG.md

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

4+
## [1.4.8] - Service release
5+
6+
### Features
7+
8+
- Add support for automated testing for HestiaCP code with @drone
9+
- Add support for SMTP server for internal email #1988 @Myself5 / #1165
10+
11+
### Bugfixes
12+
13+
- Updated jQuery and jQuery UI to the latest version due to a vulnerability in jQuery. @dependabot
14+
- Resolve issue with double ENFORCE_SUBDOMAIN_OWNERSHIP keys in hestia.conf
15+
- Resolve issue with create new user during install in some cases #2000
16+
- Fixed an issue with Quick Install apps named Test123 (@PsychotherapistSam)
17+
- Fix an issue with dovecot 2.3 ssl config (#1432)
18+
- Load $HESTIA path during upgrade script (#1698)
19+
- Remove TLS 1.1 from Proftpd config (#950)
20+
- Don't remove postfix when Exim is not installed (#1995)
21+
- Fix a bug in no-php Nginx FPM template (##2007)
22+
- Update German translations
23+
- Fixed a few minor error in Mail DMS records (#2005)
24+
25+
426
## [1.4.7] - Service release
527

628
### Bugfixes
729

8-
- Fix #1984 phppgadmin not working on apache2 systems
9-
- Fix #1985 Restart service not working
30+
- Fixed #1984 phppgadmin not working on apache2 systems
31+
- Fixed #1985 Restart service not working
1032

1133

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

2042
### Bugfixes
2143

22-
- Fix #1961 Renewal Apache2 only SSL certificate fails
44+
- Fixed #1961 Renewal Apache2 only SSL certificate fails
2345
- Fixed #1956 to prevent reset of defined webmail client.
2446
- Explicitly disable cron reports #1978
2547
- Fixed an issue where in rare cases certificate failed to install @dpeca and @myvesta
2648
- 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
49+
- Fixed #1980 Lets Encrypt Auto Renewal Reverts Webmail Client back to Roundcube
2850

2951
## [1.4.5] - Service release
3052

3153
### Bugfixes
3254

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

@@ -45,15 +67,15 @@ All notable changes to this project will be documented in this file.
4567
### Bugfixes
4668

4769
- 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.
70+
- Fixed PHP bug in /list/log/
71+
- Fixed issue with time in /list/services as it was showing as 50 minute1 instead of minutes
72+
- Add missing back buttons + fix behaviour of back buttons on login page.
5173
- Set "default" when WEB_TEMPLATE and PROXY_TEMPLATE is missing in user.conf
5274
- 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)
75+
- Fixed possible error occur for v-rebuild-cron-jobs #1943 (thanks @clarkchentw)
76+
- Restrict access file manager when SSH is enabled for the user (@bet0x)
5577
- Check for DNS domains when running v-change-sys-ip-nat (@clarkchentw)
56-
- Fix logical error in installer (@clarkchentw)
78+
- Fixed logical error in installer (@clarkchentw)
5779

5880
## [1.4.3] - Service release
5981

@@ -99,10 +121,10 @@ Then run the update via
99121

100122
### Bugfixes
101123

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
124+
- Fixed issue wit startup script for iptables / network (#1849) (@myrevery)
125+
- Fixed problem with accidentally replacing nginx.conf during upgrade nginx (#1878 / @myrevery)
126+
- Fixed issue with installing Ubuntu 18.04
127+
- Fixed issue with login into file manger as admin user
106128
- Added proxy_extentions back to support older custom templates
107129
- Added the possibility to skip the forced reboot when interactive is set to no
108130
- Fixed an issue with modx template
@@ -539,17 +561,17 @@ Then run the update via
539561
- Remove broken /webmail alias from previous versions.
540562
- Webmail IP address is now inherited from web domain when using multiple IPs.
541563
- Exim now uses the web domain IP if it exists.
542-
- Fix incorrect MX record for DNS domains using the Office 365 template.
564+
- Fixed incorrect MX record for DNS domains using the Office 365 template.
543565

544566
## [1.0.6] - 2019-09-24 - Hotfix
545567
### Bugfixes
546568
- Add support for HTTP/2 Let's Encrypt Server.
547569

548570
## [1.0.5] - 2019-08-06 - Hotfix
549571
### Bugfixes
550-
- Fix several security issues, thanks to Andrea Cardaci (https://cardaci.xyz/)
572+
- Fixed several security issues, thanks to Andrea Cardaci (https://cardaci.xyz/)
551573
- 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.
574+
- Fixed if condition, use nginx for Let's Encrypt ACME request if present.
553575

554576
## [1.0.4] - 2019-07-09 - Hotfix
555577
### 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.8 | [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)