Skip to content

Commit f8b4ecd

Browse files
author
Kristan Kenney
committed
Merge branch 'main' into feature/ui-themes_vestia
2 parents eeada89 + 39a6ace commit f8b4ecd

File tree

82 files changed

+362
-156
lines changed

Some content is hidden

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

82 files changed

+362
-156
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ All notable changes to this project will be documented in this file.
4343
- Fixed xss vulnerability in v-add-sys-ip and user history log (thanks **@numanturle**)
4444
- Fixed remote execution possibility when deleting ssh key (thanks **@numanturle**)
4545

46+
## [1.3.4] - Service Release
47+
### Features
48+
- No new features have been introduced in this release.
49+
50+
### Bugfixes
51+
- Fixed xss vulnerability in v-add-sys-ip and user history log (thanks **@numanturle**)
52+
- Fixed remote execution possibility when deleting ssh key (thanks **@numanturle**)
53+
4654
## [1.3.3] - Service Release
4755
### Bugfixes
4856
- Improved if web folder already exists and do not follow symlink on chmod (thanks @0xGsch and @kikoas1995).

README.md

Lines changed: 1 addition & 1 deletion
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.3 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
5+
**Latest stable release:** Version 1.3.4 | [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>

bin/v-add-mail-domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ fi
154154
# Add webmail configuration to mail domain
155155
if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
156156
if [ ! -z "$IMAP_SYSTEM" ]; then
157-
$BIN/v-add-sys-webmail $user $domain '' '' ''
157+
$BIN/v-add-sys-webmail $user $domain '' 'no'
158158
fi
159159
fi
160160

bin/v-add-sys-filemanager

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ MODE=$1
1919
user="admin"
2020

2121
FM_INSTALL_DIR="$HESTIA/web/fm"
22-
FM_FILE="filegator_v${FM_V}.zip"
23-
FM_URL="https://github.com/filegator/filegator/releases/download/v${FM_V}/${FM_FILE}"
22+
FM_FILE="filegator_v${fm_v}.zip"
23+
FM_URL="https://github.com/filegator/filegator/releases/download/v${fm_v}/${FM_FILE}"
2424
COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
2525

2626

bin/v-add-sys-ip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ source $HESTIA/conf/hestia.conf
4242
#----------------------------------------------------------#
4343

4444
check_args '2' "$#" 'IP NETMASK [INTERFACE] [USER] [STATUS] [NAME] [NATED_IP] [HELO]'
45-
is_format_valid 'ip' 'netmask' 'interface' 'user' 'ip_status'
45+
is_format_valid 'ip' 'netmask' 'iface' 'user' 'ip_status'
4646
is_ip_free
4747
is_object_valid 'user' 'USER' "$user"
4848
is_object_unsuspended 'user' 'USER' "$user"

bin/v-add-sys-webmail

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22
# info: add webmail support for a domain
3-
# options: USER DOMAIN WEBMAIL [RESTART] [QUIET]
3+
# options: USER DOMAIN [WEBMAIL] [RESTART] [QUIET]
44
# labels: hestia
55
#
66
# example: v-add-sys-webmail user domain.com
7+
# example: v-add-sys-webmail user domain.com rainloop
8+
# example: v-add-sys-webmail user domain.com roundcube
79
#
8-
# this function adds support for webmail services
9-
# to a mail domain.
10+
# this function enables webmail client for a mail domain.
1011

1112
#----------------------------------------------------------#
1213
# Variable&Function #
@@ -51,7 +52,7 @@ if [ -z "$webmail" ]; then
5152
done
5253
fi
5354

54-
check_args '3' "$#" 'USER DOMAIN WEBMAIL [RESTART]'
55+
check_args '2' "$#" 'USER DOMAIN [WEBMAIL] [RESTART]'
5556
is_format_valid 'user' 'domain'
5657
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
5758
is_system_enabled "$IMAP_SYSTEM" 'IMAP_SYSTEM'
@@ -94,10 +95,10 @@ else
9495

9596
if [ "$dns_domain" = "$domain" ]; then
9697
if [ -z "$webmail_record" ]; then
97-
$BIN/v-add-dns-record $user $domain $WEBMAIL_ALIAS A $ip
98+
$BIN/v-add-dns-record $user $domain $WEBMAIL_ALIAS A $ip '' '' $restart
9899
else
99-
$BIN/v-delete-dns-record $user $domain $webmail_record
100-
$BIN/v-add-dns-record $user $domain $WEBMAIL_ALIAS A $ip
100+
$BIN/v-delete-dns-record $user $domain $webmail_record $restart
101+
$BIN/v-add-dns-record $user $domain $WEBMAIL_ALIAS A $ip '' '' $restart
101102
fi
102103
fi
103104
fi

bin/v-add-web-domain-ssl-force

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ fi
8585
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_FORCE' 'yes'
8686

8787
# Restart web server
88-
$BIN/v-restart-web
88+
$BIN/v-restart-web $restart
8989
check_result $? "Web restart failed" > /dev/null
9090

9191
# Restart proxy
92-
$BIN/v-restart-proxy
92+
$BIN/v-restart-proxy $restart
9393
check_result $? "Proxy restart failed" > /dev/null
9494

9595
# Logging

bin/v-add-web-domain-ssl-hsts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ fi
7171
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HSTS' 'yes'
7272

7373
# Restart web server
74-
$BIN/v-restart-web
74+
$BIN/v-restart-web $restart
7575
check_result $? "Web restart failed" > /dev/null
7676

7777
# Restart proxy
78-
$BIN/v-restart-proxy
78+
$BIN/v-restart-proxy $restart
7979
check_result $? "Proxy restart failed" > /dev/null
8080

8181
# Logging

bin/v-change-dns-domain-tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if [ "$template" = "office365" ]; then
123123
if [ "$?" -eq 0 ]; then
124124
record='@'
125125
formatted_domain=$(echo "$domain" | sed 's/\./-/g')
126-
$BIN/v-add-dns-record $user $domain $record MX "${formatted_domain}.mail.protection.outlook.com." '0'
126+
$BIN/v-add-dns-record $user $domain $record MX "${formatted_domain}.mail.protection.outlook.com." '0' '' $restart
127127
fi
128128
fi
129129

bin/v-change-sys-api

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
# info: Enable / Disable API access
3+
# options: STATUS
4+
# labels: hestia
5+
#
6+
# example: v-change-sys-api enable
7+
# # Enable API
8+
#
9+
# example: v-change-sys-api disable
10+
# # Disable API
11+
#
12+
# Enabled / Disable API
13+
14+
15+
status=$1
16+
17+
# Includes
18+
source $HESTIA/func/main.sh
19+
source $HESTIA/conf/hestia.conf
20+
21+
#----------------------------------------------------------#
22+
# Variable&Function #
23+
#----------------------------------------------------------#
24+
25+
check_args '1' "$#" "STATUS"
26+
is_type_valid "enable,disable" "$status"
27+
28+
# Perform verification if read-only mode is enabled
29+
check_hestia_demo_mode
30+
31+
#----------------------------------------------------------#
32+
# Action #
33+
#----------------------------------------------------------#
34+
35+
if [ "$status" = "enable" ]; then
36+
if [ $API = "no" ]; then
37+
if [ ! -f "$HESTIA/web/api/index.php" ]; then
38+
wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/api/index.php -O $HESTIA/web/api/index.php
39+
else
40+
sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php
41+
fi
42+
$HESTIA/bin/v-change-sys-config-value "API" "yes"
43+
fi
44+
else
45+
if [ $API = "yes" ]; then
46+
$HESTIA/bin/v-change-sys-config-value "API" "no"
47+
$HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
48+
sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
49+
fi
50+
fi
51+
52+
#----------------------------------------------------------#
53+
# Logging #
54+
#----------------------------------------------------------#
55+
56+
log_history "API status has been changed to $status" '' 'admin'
57+
log_event "$OK" "$ARGUMENTS"

0 commit comments

Comments
 (0)