mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-07-03 16:02:45 +00:00
acme.sh: Use idn2 instead of idn
This fixes the following strange (and recent?) error: $ idn --quiet læwifi.fr idn: could not convert from ASCII to UTF-8
This commit is contained in:
parent
a199fc6113
commit
74e61c6167
12
acme.sh
12
acme.sh
@ -1181,7 +1181,7 @@ _idn() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _exists idn; then
|
if _exists idn2; then
|
||||||
if _contains "$__idn_d" ','; then
|
if _contains "$__idn_d" ','; then
|
||||||
_i_first="1"
|
_i_first="1"
|
||||||
for f in $(echo "$__idn_d" | tr ',' ' '); do
|
for f in $(echo "$__idn_d" | tr ',' ' '); do
|
||||||
@ -1191,13 +1191,13 @@ _idn() {
|
|||||||
else
|
else
|
||||||
_i_first=""
|
_i_first=""
|
||||||
fi
|
fi
|
||||||
idn --quiet "$f" | tr -d "\r\n"
|
idn2 --quiet "$f" | tr -d "\r\n"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
idn "$__idn_d" | tr -d "\r\n"
|
idn2 "$__idn_d" | tr -d "\r\n"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
_err "Please install idn to process IDN names."
|
_err "Please install (lib)idn2 to process IDN names."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6988,8 +6988,8 @@ _process() {
|
|||||||
_err "'$_dvalue' is not a valid domain for parameter '$1'"
|
_err "'$_dvalue' is not a valid domain for parameter '$1'"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if _is_idn "$_dvalue" && ! _exists idn; then
|
if _is_idn "$_dvalue" && ! _exists idn2; then
|
||||||
_err "It seems that $_dvalue is an IDN( Internationalized Domain Names), please install 'idn' command first."
|
_err "It seems that $_dvalue is an IDN( Internationalized Domain Names), please install 'idn2' command first."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user