mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 19:07:43 +00:00
Added more quotes
This commit is contained in:
parent
6000b79be4
commit
e4b89a81c1
@ -65,7 +65,7 @@ _ISPC_getZoneInfo() {
|
|||||||
_info "Getting Zoneinfo"
|
_info "Getting Zoneinfo"
|
||||||
zoneEnd=false
|
zoneEnd=false
|
||||||
curZone="${fulldomain}"
|
curZone="${fulldomain}"
|
||||||
while [ ${zoneEnd} = false ]; do
|
while [ "${zoneEnd}" = false ]; do
|
||||||
# we can strip the first part of the fulldomain, since it's just the _acme-challenge string
|
# we can strip the first part of the fulldomain, since it's just the _acme-challenge string
|
||||||
curZone="${curZone#*.}"
|
curZone="${curZone#*.}"
|
||||||
# suffix . needed for zone -> domain.tld.
|
# suffix . needed for zone -> domain.tld.
|
||||||
@ -84,9 +84,9 @@ _ISPC_getZoneInfo() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ${zoneFound} ]; then
|
if [ "${zoneFound}" ]; then
|
||||||
server_id=$(echo "${curResult}" | _egrep_o "server_id.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
server_id=$(echo "${curResult}" | _egrep_o "server_id.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
||||||
case ${server_id} in
|
case "${server_id}" in
|
||||||
'' | *[!0-9]*)
|
'' | *[!0-9]*)
|
||||||
_err "Server ID is not numeric."
|
_err "Server ID is not numeric."
|
||||||
return 1
|
return 1
|
||||||
@ -94,7 +94,7 @@ _ISPC_getZoneInfo() {
|
|||||||
*) _info "Successfully retrieved Server ID" ;;
|
*) _info "Successfully retrieved Server ID" ;;
|
||||||
esac
|
esac
|
||||||
zone=$(echo "${curResult}" | _egrep_o "\"id.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
zone=$(echo "${curResult}" | _egrep_o "\"id.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
||||||
case ${zone} in
|
case "${zone}" in
|
||||||
'' | *[!0-9]*)
|
'' | *[!0-9]*)
|
||||||
_err "Zone ID is not numeric."
|
_err "Zone ID is not numeric."
|
||||||
return 1
|
return 1
|
||||||
@ -102,7 +102,7 @@ _ISPC_getZoneInfo() {
|
|||||||
*) _info "Successfully retrieved Zone ID" ;;
|
*) _info "Successfully retrieved Zone ID" ;;
|
||||||
esac
|
esac
|
||||||
client_id=$(echo "${curResult}" | _egrep_o "sys_userid.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
client_id=$(echo "${curResult}" | _egrep_o "sys_userid.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
||||||
case ${client_id} in
|
case "${client_id}" in
|
||||||
'' | *[!0-9]*)
|
'' | *[!0-9]*)
|
||||||
_err "Client ID is not numeric."
|
_err "Client ID is not numeric."
|
||||||
return 1
|
return 1
|
||||||
@ -121,7 +121,7 @@ _ISPC_addTxt() {
|
|||||||
curData="{\"session_id\":\"${sessionID}\",\"client_id\":\"${client_id}\",\"params\":{${params}}}"
|
curData="{\"session_id\":\"${sessionID}\",\"client_id\":\"${client_id}\",\"params\":{${params}}}"
|
||||||
curResult=$(_post "${curData}" "${ISPC_Api}?dns_txt_add")
|
curResult=$(_post "${curData}" "${ISPC_Api}?dns_txt_add")
|
||||||
record_id=$(echo "${curResult}" | _egrep_o "\"response.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
record_id=$(echo "${curResult}" | _egrep_o "\"response.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
||||||
case ${record_id} in
|
case "${record_id}" in
|
||||||
'' | *[!0-9]*)
|
'' | *[!0-9]*)
|
||||||
_err "Record ID is not numeric."
|
_err "Record ID is not numeric."
|
||||||
return 1
|
return 1
|
||||||
@ -144,7 +144,7 @@ _ISPC_rmTxt() {
|
|||||||
if _contains "${i}" "${fulldomain}"; then
|
if _contains "${i}" "${fulldomain}"; then
|
||||||
_info "Successfully found ACME challenge txt record."
|
_info "Successfully found ACME challenge txt record."
|
||||||
record_id=$(echo "${i}" | _egrep_o "\"id.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
record_id=$(echo "${i}" | _egrep_o "\"id.*" | cut -d ':' -f 2 | cut -d '"' -f 2)
|
||||||
case ${record_id} in
|
case "${record_id}" in
|
||||||
'' | *[!0-9]*)
|
'' | *[!0-9]*)
|
||||||
# Setting to debug only becase there's no harm if the txt record remains
|
# Setting to debug only becase there's no harm if the txt record remains
|
||||||
_debug "Record ID is not numeric."
|
_debug "Record ID is not numeric."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user