File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,14 @@ is_format_valid 'user' 'data'
3131is_system_enabled " $DNS_SYSTEM " ' DNS_SYSTEM'
3232is_object_valid ' user' ' USER' " $user "
3333is_object_unsuspended ' user' ' USER' " $user "
34- eval $data
34+ parse_object_kv_list " $data "
35+
3536domain=" $DOMAIN "
37+ if [ -z " $domain " ]; then
38+ check_result $E_ARGS " Domain name missing from DATA"
39+ fi
40+ is_format_valid ' domain'
41+
3642if [ " $flush " = ' no' ]; then
3743 is_domain_new ' dns' $domain
3844fi
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
3030is_object_valid ' user' ' USER' " $user "
3131is_object_unsuspended ' user' ' USER' " $user "
3232is_object_valid ' dns' ' DOMAIN' " $domain "
33+ parse_object_kv_list " $data "
3334
3435
3536# ----------------------------------------------------------#
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ is_type_format_valid() {
7777# ----------------------------------------------------------#
7878
7979check_args ' 2' " $# " ' TYPE HOST [FORMAT]'
80+ is_format_valid ' host'
8081is_type_format_valid " $type "
8182is_object_valid " ../../conf/$type " ' HOST' " $host "
8283
@@ -86,7 +87,7 @@ is_object_valid "../../conf/$type" 'HOST' "$host"
8687# ----------------------------------------------------------#
8788
8889# Parsing hosts
89- eval $( grep " HOST='$host '" $HESTIA /conf/$type .conf)
90+ parse_object_kv_list $( grep " HOST='$host '" $HESTIA /conf/$type .conf)
9091
9192# Listing data
9293case $format in
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ source $HESTIA/conf/hestia.conf
2121# Verifications #
2222# ----------------------------------------------------------#
2323
24+ is_format_valid ' host'
2425is_system_enabled " $DNS_CLUSTER " ' DNS_CLUSTER'
2526is_procces_running
2627remote_dns_health_check ' no_email'
4243for cluster in $hosts ; do
4344
4445 # Parsing host values
45- eval $cluster
46+ parse_object_kv_list " $cluster "
4647
4748 # Wiping remote domains
4849 cluster_cmd v-delete-dns-domains-src $DNS_USER $HOSTNAME no
@@ -54,7 +55,7 @@ for cluster in $hosts; do
5455 for str in $( cat $HESTIA /data/users/$user /dns.conf) ; do
5556
5657 # Syncing domain index
57- eval $str
58+ parse_object_kv_list " $str "
5859 cluster_cmd v-insert-dns-domain $DNS_USER " $str " $HOSTNAME ' ' no
5960 check_result $? " $HOST connection failed" $E_CONNECT
6061
You can’t perform that action at this time.
0 commit comments