Pārlūkot izejas kodu

Merge pull request #812 from pcfreak30/hotfix/811

Automatically quote DNS records that have special characters
Serghey Rodin 9 gadi atpakaļ
vecāks
revīzija
ce1be73afa
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      bin/v-add-dns-record

+ 6 - 0
bin/v-add-dns-record

@@ -49,6 +49,12 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
     fi
 fi
 
+dvalue=${dvalue//\"/}
+
+if [[ "dvalue" =~ [^\;\s] ]]; then
+    dvalue='"'"$dvalue"'"'
+fi
+
 
 #----------------------------------------------------------#
 #                    Verifications                         #