We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f714a8d commit b807c8bCopy full SHA for b807c8b
dnsapi/dns_acmedns.sh
@@ -122,7 +122,12 @@ _acmedns_lookup_from_json() {
122
[ -z "$_storage" ] && _storage="$HOME/.acme-dns.json"
123
[ ! -f "$_storage" ] && return 1
124
125
- _entry="$(sed -n "/\"${_domain//./\\.}\"[[:space:]]*:/,/}/p" "$_storage")"
+ # Escape dots in the domain for use in sed
126
+ _safe_domain=$(printf '%s\n' "$_domain" | sed 's/\./\\./g')
127
+
128
+ _entry="$(
129
+ sed -n "/\"$_safe_domain\"[[:space:]]*:/,/}/p" "$_storage"
130
+ )"
131
[ -z "$_entry" ] && return 1
132
133
_server_url="$(echo "$_entry" | sed -n 's/.*"server_url":[ ]*"\([^"]*\)".*/\1/p')"
0 commit comments