]> git.proxmox.com Git - mirror_acme.sh.git/blobdiff - dnsapi/dns_netcup.sh
fix #2830 Autorization segment typo fixed
[mirror_acme.sh.git] / dnsapi / dns_netcup.sh
index d5d7c22eafd6690026bc09b5ec7dd5d16d02d803..d519e4f7123eba26bea7ae4eb97e6645ea1f0b51 100644 (file)
@@ -117,7 +117,7 @@ dns_netcup_rm() {
 
 login() {
   tmp=$(_post "{\"action\": \"login\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apipassword\": \"$NC_Apipw\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST")
-  sid=$(_getfield "$tmp" "8" | sed s/\"responsedata\":\{\"apisessionid\":\"//g | sed 's/\"\}\}//g')
+  sid=$(echo "$tmp" | tr '{}' '\n' | grep apisessionid | cut -d '"' -f 4)
   _debug "$tmp"
   if [ "$(_getfield "$msg" "4" | sed s/\"status\":\"//g | sed s/\"//g)" != "success" ]; then
     _err "$msg"