Skip to content

Commit de7a08e

Browse files
authored
Merge pull request hestiacp#1475 from hestiacp/main
Bring staging in sync.
2 parents 90b1847 + 4b4edd5 commit de7a08e

Some content is hidden

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

43 files changed

+791
-44
lines changed

CHANGELOG.md

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

4-
## [1.3.2] - Service Release
4+
## [DEVELOPMENT]
55
### Features
66
- No new features have been introduced in this release.
77

88
### Bugfixes
9-
- Fixed an issue where Let's Encrypt certificates were not regenerated when changing domain aliases (#1353)
109
- Fixed an issue where user name was duplicated when editing FTP users (#1411)
1110
- Fixed an issue where the iptables service would appear to be in a stopped state when fail2ban is stopped. (#1374)
1211
- Fixed an issue where the default language value was incorrectly set under Server Settings > Configure.
@@ -15,6 +14,16 @@ All notable changes to this project will be documented in this file.
1514
- Fixed an issue where IP addresses could not be deleted (#1423)
1615
- Improvements have been made to the API's error handling - thanks **@danielalexis**!
1716

17+
## [1.3.2] - Service Release
18+
### Features
19+
- Added PHP v8.0 support for multiphp environment.
20+
21+
### Bugfixes
22+
- Improved session token handling in login as function, thanks to Vulnerability Laboratory - [Evolution Security GmbH]™.
23+
- Fixed an where fpm pool config was not deleted when changing backend template.
24+
- Improved bats testing with multiphp (5.6-8.0) tests.
25+
- Fixed an issue where full webmail path was loaded as default value.
26+
1827
## [1.3.1] - Service Release
1928
### Features
2029
- No new features have been introduced in this release.

README.md

Lines changed: 2 additions & 2 deletions
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.1 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
5+
**Latest stable release:** Version 1.3.2 | [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>
@@ -19,7 +19,7 @@ Hestia Control Panel is designed to provide administrators an easy to use web an
1919
Features and Services
2020
----------------------------
2121
* Apache2 and NGINX with PHP-FPM
22-
* Multiple PHP versions (5.6 - 7.4, 7.4 as default)
22+
* Multiple PHP versions (5.6 - 8.0, 7.4 as default)
2323
* DNS Server (Bind) with clustering capabilities
2424
* POP/IMAP/SMTP mail services with Anti-Virus, Anti-Spam, and Webmail (ClamAV, SpamAssassin, and Roundcube)
2525
* MariaDB or PostgreSQL databases

bin/v-add-letsencrypt-domain

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ query_le_v2() {
5555
# Save http response to file passed as "$4" arg or print to stdout if not provided
5656
# http response headers are always sent to stdout
5757
local save_to_file=${4:-"/dev/stdout"}
58-
curl --silent --dump-header /dev/stdout --data "$post_data" "$1" --header "$content" --output "$save_to_file"
58+
curl --location --insecure --retry 5 --retry-connrefused --silent --dump-header /dev/stdout --data "$post_data" "$1" --header "$content" --output "$save_to_file"
59+
debug_log "API call" "exit status: $?"
5960
}
6061

6162

@@ -410,10 +411,31 @@ if [[ "$status" -ne 200 ]]; then
410411
fi
411412

412413
# Downloading signed certificate / STEP 7
413-
answer=$(query_le_v2 "$certificate" "" "$nonce" "$ssl_dir/$domain.pem")
414-
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
414+
status=0
415+
retry=0
416+
417+
while [[ $status != 200 && $retry -lt 3 ]]; do
418+
419+
answer=$(query_le_v2 "$certificate" "" "$nonce" "$ssl_dir/$domain.pem")
420+
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
421+
422+
debug_log "Step 7" "- status: ${status}\n- retry: ${retry}\n- answer: ${answer}"
423+
424+
if [[ $status != 200 ]]; then
425+
retry=$((retry + 1))
426+
sleep $((retry * 2)) # Sleep for 2s, 4s, 6s, 8s
427+
fi
428+
429+
done
430+
431+
# Fallback on depreciated download method for certs (unauthenticated GET)
432+
if [[ $status != 200 ]]; then
433+
answer=$(curl --insecure --retry 5 --retry-connrefused --silent --dump-header /dev/stdout "$certificate" --output "$ssl_dir/$domain.pem")
434+
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
435+
436+
debug_log "Step 7 - Fallback" "- status: ${status}\n- answer: ${answer}"
437+
fi
415438

416-
debug_log "Step 7" "- status: ${status}\n- answer: ${answer}"
417439
debug_log "CERT DIR" "$(ls -las "$ssl_dir/")"
418440
debug_log "CERT PEM" "$(cat "$ssl_dir/$domain.pem")"
419441

bin/v-add-user-composer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ if [[ "$signature" != $(sha384sum $COMPOSER_SETUP_FILE | cut -f 1 -d " ") ]]; th
7373
check_result $E_INVALID "Composer signature does not match"
7474
fi
7575

76-
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php "$COMPOSER_SETUP_FILE" --quiet --install-dir="$COMPOSER_DIR" --filename=composer
76+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php "$COMPOSER_SETUP_FILE" --1 --quiet --install-dir="$COMPOSER_DIR" --filename=composer
7777
check_result $? "Composer install failed"
7878

7979
[ -f "$COMPOSER_SETUP_FILE" ] && rm -f "$COMPOSER_SETUP_FILE"

bin/v-add-web-php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# options: VERSION
44
# labels: hestia
55
#
6-
# example: v-add-web-php 7.4
6+
# example: v-add-web-php 8.0
77
#
88
# The function checks and delete a fpm php version if not used by any domain.
99

@@ -32,7 +32,7 @@ php_fpm="/etc/init.d/php$version-fpm"
3232
# Verify php version format
3333
if [[ ! $version =~ ^[0-9]\.[0-9]+ ]]; then
3434
echo "The specified PHP version format is invalid, it should look like [0-9].[0-9]."
35-
echo "Example: 7.0, 7.4"
35+
echo "Example: 7.0, 7.4, 8.0"
3636
exit
3737
fi
3838

@@ -67,6 +67,11 @@ if [[ `echo "$version 7.2" | awk '{print ($1 < $2)}'` == 1 ]]; then
6767
mph="$mph php$version-mcrypt"
6868
fi
6969

70+
# Check if version is 8.0 or higher and drop php json.
71+
if [[ ${version:0:1} == "8" ]]; then
72+
mph=$(echo "$mph" | sed -e "s/php$version-json//")
73+
fi
74+
7075
if ! echo "$DB_SYSTEM" | grep -w 'mysql' >/dev/null; then
7176
mph=$(echo "$mph" | sed -e "s/php$version-mysql//")
7277
fi

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ check_hestia_demo_mode
5252
# Action #
5353
#----------------------------------------------------------#
5454

55-
# Deleting current backend
56-
delete_web_backend
57-
5855
# Prepare new backend configuration
5956
prepare_web_backend
6057

58+
# Deleting current backend
59+
delete_web_backend
60+
6161
# Allocating backend port
6262
backend_port=9000
6363
ports=$(grep -v '^;' $pool/* 2>/dev/null |grep listen |grep -o :[0-9].*)

bin/v-update-sys-rrd-pgsql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ for host in $hosts; do
7676
done
7777

7878
export PGPASSWORD="$PASSWORD"
79-
sql="psql -h $HOST -U $USER -c"
79+
sql="psql -h $HOST -U $USER"
8080

8181
# Checking empty vars
8282
if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ]; then
@@ -88,7 +88,7 @@ for host in $hosts; do
8888
# Parsing data
8989
q='SELECT SUM(xact_commit + xact_rollback), SUM(numbackends)
9090
FROM pg_stat_database;'
91-
status=$($sql plsql -d postgres -c "$q" 2>/dev/null); code="$?"
91+
status=$($sql -d postgres -c "$q" 2>/dev/null); code="$?"
9292
if [ '0' -ne "$code" ]; then
9393
active=0
9494
slow=0

install/deb/multiphp/apache2/PHP-56.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
4545
pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
4646
pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
4747
pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
48+
pool_file_80="/etc/php/8.0/fpm/pool.d/$2.conf"
4849

4950
if [ ! -f "$pool_file_56" ]; then
5051
echo "$pool_conf" > $pool_file_56
@@ -76,4 +77,9 @@ if [ -f "$pool_file_74" ]; then
7677
service php7.4-fpm restart
7778
fi
7879

80+
if [ -f "$pool_file_80" ]; then
81+
rm $pool_file_80
82+
service php8.0-fpm restart
83+
fi
84+
7985
exit 0

install/deb/multiphp/apache2/PHP-70.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
4545
pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
4646
pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
4747
pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
48+
pool_file_80="/etc/php/8.0/fpm/pool.d/$2.conf"
4849

4950
if [ -f "$pool_file_56" ]; then
5051
rm $pool_file_56
@@ -76,4 +77,9 @@ if [ -f "$pool_file_74" ]; then
7677
service php7.4-fpm restart
7778
fi
7879

80+
if [ -f "$pool_file_80" ]; then
81+
rm $pool_file_80
82+
service php8.0-fpm restart
83+
fi
84+
7985
exit 0

install/deb/multiphp/apache2/PHP-71.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
4545
pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
4646
pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
4747
pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
48+
pool_file_80="/etc/php/8.0/fpm/pool.d/$2.conf"
4849

4950
if [ -f "$pool_file_56" ]; then
5051
rm $pool_file_56
@@ -76,4 +77,9 @@ if [ -f "$pool_file_74" ]; then
7677
service php7.4-fpm restart
7778
fi
7879

80+
if [ -f "$pool_file_80" ]; then
81+
rm $pool_file_80
82+
service php8.0-fpm restart
83+
fi
84+
7985
exit 0

0 commit comments

Comments
 (0)