]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
Merge pull request #3529 from Haarolean/bugfix/porkbun-fixes
authorneil <github@neilpang.com>
Tue, 1 Jun 2021 13:29:14 +0000 (21:29 +0800)
committerGitHub <noreply@github.com>
Tue, 1 Jun 2021 13:29:14 +0000 (21:29 +0800)
Porkbun DNS API fixes

acme.sh
dnsapi/dns_1984hosting.sh

diff --git a/acme.sh b/acme.sh
index 020146576e3a13792bb20e80d1e2b5dadbe224e2..47eb5a9a55ce985c0e40e319cbb49a62df4a139f 100755 (executable)
--- a/acme.sh
+++ b/acme.sh
@@ -2538,7 +2538,7 @@ _initAPI() {
     response=$(_get "$_api_server")
     if [ "$?" != "0" ]; then
       _debug2 "response" "$response"
-      _err "Can not init api."
+      _err "Can not init api for: $_api_server."
       return 1
     fi
     response=$(echo "$response" | _json_decode)
@@ -4132,7 +4132,9 @@ issue() {
 
   _debug "Using ACME_DIRECTORY: $ACME_DIRECTORY"
 
-  _initAPI
+  if ! _initAPI; then
+    return 1
+  fi
 
   if [ -f "$DOMAIN_CONF" ]; then
     Le_NextRenewTime=$(_readdomainconf Le_NextRenewTime)
index d720c1c5741de195dfd461281cd0901200566130..d7e558a1ec10dbe5389b0736dc1c7cd27ce1d63d 100755 (executable)
@@ -145,7 +145,7 @@ _1984hosting_login() {
   password=$(printf '%s' "$One984HOSTING_Password" | _url_encode)
   url="https://management.1984hosting.com/accounts/checkuserauth/"
 
-  response="$(_post "username=$username&password=$password&otpkey=" "$url")"
+  response="$(_post "username=$username&password=$password&otpkey=" $url)"
   response="$(echo "$response" | _normalizeJson)"
   _debug2 response "$response"