Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
neil committed Jun 1, 2021
1 parent c2273d2 commit d154118
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dnsapi/dns_1984hosting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ _check_cookie() {
fi

_authget "https://management.1984hosting.com/accounts/loginstatus/"
response="$(echo "$_response" | _normalizeJson)"
if _contains "$response" '"ok": true'; then
_debug "Cached cookie still valid"
return 0
Expand Down Expand Up @@ -205,7 +204,7 @@ _get_root() {
fi

_authget "https://management.1984hosting.com/domains/soacheck/?zone=$h&nameserver=ns0.1984.is."
if _contains "$_response" "serial"; then
if _contains "$_response" "serial" && ! _contains "$_response" 'null}'; then
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
_domain="$h"
return 0
Expand All @@ -219,7 +218,7 @@ _get_root() {
# add extra headers to request
_authget() {
export _H1="Cookie: $One984HOSTING_COOKIE"
_response=$(_get "$1")
_response=$(_get "$1" | _normalizeJson)
_debug2 _response "$_response"
}

Expand Down

0 comments on commit d154118

Please sign in to comment.