Skip to content

Commit 27556a9

Browse files
author
Kristan Kenney
committed
Merge remote-tracking branch 'jaapmarcus/fix/prevent-install-non-controlled-package' into main
2 parents 32ef8a2 + 9a1fccd commit 27556a9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

bin/v-update-sys-hestia

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ source $HESTIA/conf/hestia.conf
3232

3333
# Checking arg number
3434
check_args '1' "$#" 'PACKAGE'
35+
is_hestia_package "hestia,hestia-nginx,hestia-php" "$package"
3536

3637
# Perform verification if read-only mode is enabled
3738
check_hestia_demo_mode

func/main.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,12 @@ multiphp_default_version() {
11541154
echo "$sys_phpversion"
11551155
}
11561156

1157+
is_hestia_package(){
1158+
if [ -z "$(echo $1 | grep -w $2)" ]; then
1159+
check_result $E_INVALID "$2 package is not controlled by hestiacp"
1160+
fi
1161+
}
1162+
11571163
# Run arbitrary cli commands with dropped privileges
11581164
# Note: setpriv --init-groups is not available on debian9 (util-linux 2.29.2)
11591165
# Input:

0 commit comments

Comments
 (0)