Procházet zdrojové kódy

Merge pull request #812 from pcfreak30/hotfix/811

Automatically quote DNS records that have special characters
Serghey Rodin před 9 roky
rodič
revize
ce1be73afa
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  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
 fi
 fi
 
 
+dvalue=${dvalue//\"/}
+
+if [[ "dvalue" =~ [^\;\s] ]]; then
+    dvalue='"'"$dvalue"'"'
+fi
+
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                    Verifications                         #
 #                    Verifications                         #