mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-10-21 13:31:18 +00:00
dns_baidu, dns_bhosted: pipe input to _lower_case, not an argument
_lower_case reads stdin only. Called as _lower_case "$x", the argument was dropped and tr read the inherited stdin. On an interactive tty that never reaches EOF, so dns_baidu hung forever on every add/rm (#7319). Under cron stdin is /dev/null and the value came back empty: dns_baidu fell into the default engine order by luck, and the dns_bhosted fallback error checks could never match. Fixes #7319
This commit is contained in:
1 parent
3e6d4835e5
commit
cf51ad22d1
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -120,7 +120,7 @@ _baidu_run_with_fallback() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_baidu_engine_order() {
|
_baidu_engine_order() {
|
||||||
_pref="$(_lower_case "$(_baidu_trim_ws "${Baidu_API_Preference:-auto}")")"
|
_pref="$(_baidu_trim_ws "${Baidu_API_Preference:-auto}" | _lower_case)"
|
||||||
case "$_pref" in
|
case "$_pref" in
|
||||||
legacy)
|
legacy)
|
||||||
printf "%s" "legacy new"
|
printf "%s" "legacy new"
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ _bhosted_response_has_error() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Fallback for unexpected/non-XML responses
|
# Fallback for unexpected/non-XML responses
|
||||||
_resp_lc="$(_lower_case "$_resp")"
|
_resp_lc="$(printf "%s\n" "$_resp" | _lower_case)"
|
||||||
|
|
||||||
if _contains "$_resp_lc" "error"; then
|
if _contains "$_resp_lc" "error"; then
|
||||||
_debug "Detected 'error' in response"
|
_debug "Detected 'error' in response"
|
||||||
|
|||||||