Skip to content

Commit ce1be73

Browse files
Merge pull request hestiacp#812 from pcfreak30/hotfix/811
Automatically quote DNS records that have special characters
2 parents f1f1bd7 + db9be6d commit ce1be73

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/v-add-dns-record

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
4949
fi
5050
fi
5151

52+
dvalue=${dvalue//\"/}
53+
54+
if [[ "dvalue" =~ [^\;\s] ]]; then
55+
dvalue='"'"$dvalue"'"'
56+
fi
57+
5258

5359
#----------------------------------------------------------#
5460
# Verifications #

0 commit comments

Comments
 (0)