]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
Fix an improbable corner case.
authorOndrej Simek <me@ondrejsimek.com>
Sat, 29 Jul 2017 12:29:13 +0000 (14:29 +0200)
committerOndrej Simek <me@ondrejsimek.com>
Sat, 29 Jul 2017 12:29:13 +0000 (14:29 +0200)
dnsapi/dns_he.sh

index 7dde55d4bc642ee8c8c17a544b106e05d0b73a38..152d469cbfc6cbaacca2a544df0513cec57a439c 100755 (executable)
@@ -72,10 +72,11 @@ dns_he_rm() {
   body="$body&hosted_dns_zoneid=$_zone_id"
   body="$body&menu=edit_zone"
   body="$body&hosted_dns_editzone="
+  domain_regex="$(echo "$_full_domain" | sed 's/\./\\./g')" # escape dots
   _record_id=$(_post "$body" "https://dns.he.net/" \
     | tr -d '\n' \
-    | _egrep_o "data=\"&quot;${_txt_value}&quot;([^>]+>){6}[^<]+<[^;]+;deleteRecord\('[0-9]+','${_full_domain}','TXT'\)" \
-    | _egrep_o "[0-9]+','${_full_domain}','TXT'\)$" \
+    | _egrep_o "data=\"&quot;${_txt_value}&quot;([^>]+>){6}[^<]+<[^;]+;deleteRecord\('[0-9]+','${domain_regex}','TXT'\)" \
+    | _egrep_o "[0-9]+','${domain_regex}','TXT'\)$" \
     | _egrep_o "^[0-9]+"
   )
   # The series of egreps above could have been done a bit shorter but