Sfoglia il codice sorgente

IDN support for MX and CNAME record. Fixes #108

Serghey Rodin 12 anni fa
parent
commit
c3e89977a3
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      func/domain.sh

+ 4 - 0
func/domain.sh

@@ -195,6 +195,10 @@ update_domain_zone() {
         done
 
         RECORD=$(idn --quiet -a -t "$RECORD")
+        if [ "$TYPE" = 'CNAME' ] || [ "$TYPE" = 'MX' ]; then
+            VALUE=$(idn --quiet -a -t "$VALUE")
+        fi
+
         if [ "$SUSPENDED" != 'yes' ]; then
             eval echo -e "\"$fields\""|sed "s/%quote%/'/g" >> $conf
         fi