瀏覽代碼

Added check for Authentication failure in dns_dynu module

robertoetcheverryr 5 年之前
父節點
當前提交
f80276584f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      dnsapi/dns_dynu.sh

+ 4 - 0
dnsapi/dns_dynu.sh

@@ -216,6 +216,10 @@ _dynu_authentication() {
     _err "Authentication failed."
     return 1
   fi
+  if _contains "$response" "Authentication Exception"; then
+    _err "Authentication failed."
+    return 1
+  fi
   if _contains "$response" "access_token"; then
     Dynu_Token=$(printf "%s" "$response" | tr -d "{}" | cut -d , -f 1 | cut -d : -f 2 | cut -d '"' -f 2)
   fi