Skip to content

Commit de8653b

Browse files
committed
Merge master into core-ubuntu-20.04
2 parents 6e26a2d + 3d76827 commit de8653b

Some content is hidden

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

67 files changed

+1901
-820
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
### Features
66

77
### Bugfixes
8+
- Disable Apache2 Server Status Module by default.
9+
- Do not allow to change the password of a non-hestia user. Thanks to Alexandre Zanni!
10+
- Use sury repository for Apache2 packages.
11+
- Check whether Nginx, Apache2 and MariaDB are selected for installation prior to adding third party repositories.
12+
- Remove duplicated set-cookie line in default fpm config.
13+
- Adjust let's encrypt validation check for idn domains, thanks to @zanami!
14+
- Set backup download location on restore for ftp/sftp, thanks to @Daniyal-Javani!
15+
- Ignore empty lines when listing firewall rules
816

917
## [1.1.1] - 2020-03-24 - Hotfix
1018
### Features

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ 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 [[ "$identifier" = *[![:ascii:]]* ]]; then
138+
identifier=$(idn -t --quiet -a $identifier)
139+
fi
137140
if ! nslookup "${identifier}" > /dev/null 2>&1 ; then
138141
check_result $E_NOTEXIST "DNS record for $identifier doesn't exist"
139142
fi

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

bin/v-change-mail-account-password

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ salt=$(generate_password "$PW_MATRIX" "8")
5555
md5="{MD5}$($BIN/v-generate-password-hash md5 $salt <<<$password)"
5656

5757
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
58+
quota=$(grep $account $HESTIA/data/users/${user}/mail/${domain}.conf)
59+
quota=$(echo $quota | awk '{ print $7 }' | sed -e "s/'//g" )
60+
quota=$(echo $quota | cut -d "=" -f 2 | sed -e "s/unlimited/0/g")
5861
sed -i "/^$account:/d" $HOMEDIR/$user/conf/mail/$domain/passwd
5962
str="$account:$md5:$user:mail::$HOMEDIR/$user::userdb_quota_rule=*:storage=${quota}M"
6063
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd

bin/v-change-user-password

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
user=$1
1414
password=$2; HIDE=2
1515

16+
# Importing system enviroment as we run this script
17+
# mostly by cron wich not read it by itself
18+
source /etc/profile
19+
1620
# Includes
1721
source $HESTIA/func/main.sh
1822
source $HESTIA/conf/hestia.conf

bin/v-list-firewall

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ json_list() {
2222
objects=$(grep RULE $HESTIA/data/firewall/rules.conf |wc -l)
2323
echo "{"
2424
while read str; do
25+
[[ -z "$str" ]] && continue;
2526
parse_object_kv_list "$str"
2627
echo -n ' "'$RULE'": {
2728
"ACTION": "'$ACTION'",
@@ -49,6 +50,7 @@ shell_list() {
4950
echo "RULE^ACTION^PROTO^PORT^IP^SPND^DATE"
5051
echo "----^------^-----^----^--^----^----"
5152
while read str; do
53+
[[ -z "$str" ]] && continue;
5254
parse_object_kv_list "$str"
5355
echo "$RULE^$ACTION^$PROTOCOL^$PORT^$IP^$SUSPENDED^$DATE"
5456
done < <(cat $HESTIA/data/firewall/rules.conf)
@@ -58,6 +60,7 @@ shell_list() {
5860
plain_list() {
5961
IFS=$'\n'
6062
while read str; do
63+
[[ -z "$str" ]] && continue;
6164
parse_object_kv_list "$str"
6265
echo -ne "$RULE\t$ACTION\t$PROTOCOL\t$PORT\t$IP\t$COMMENT\t"
6366
echo -e "$SUSPENDED\t$TIME\t$DATE"
@@ -69,6 +72,7 @@ csv_list() {
6972
IFS=$'\n'
7073
echo "RULE,ACTION,PROTOCOL,PORT,IP,COMMENT,SUSPENDED,TIME,DATE"
7174
while read str; do
75+
[[ -z "$str" ]] && continue;
7276
parse_object_kv_list "$str"
7377
echo -n "$RULE,$ACTION,$PROTOCOL,$PORT,$IP,\"$COMMENT\","
7478
echo "$SUSPENDED,$TIME,$DATE"

bin/v-restore-user

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ ftpc() {
4141
/usr/bin/ftp -n $HOST $PORT <<EOF
4242
quote USER $USERNAME
4343
quote PASS $PASSWORD
44+
lcd $BACKUP
4445
binary
4546
$1
4647
$2

install/deb/fail2ban/jail.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ maxretry = 5
4848
[recidive]
4949
enabled = true
5050
filter = recidive
51-
action = hestia[name=HESTIA]
51+
action = hestia[name=RECIDIVE]
5252
logpath = /var/log/fail2ban.log
5353
maxretry = 5
5454
findtime = 86400

install/deb/templates/web/nginx/php-fpm/default.stpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ server {
1919
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
2020
expires max;
2121
fastcgi_hide_header "Set-Cookie";
22-
fastcgi_hide_header "Set-Cookie";
2322
}
2423

2524
location ~ [^/]\.php(/|$) {

0 commit comments

Comments
 (0)