mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 19:07:43 +00:00
acme.sh: fix SC2021 (tr '[0-9]' -> '0-9')
SC2018 & SC2019 are disabled several times for `tr`. SC2021 is a separate problem (`tr` char classes don't use '[]', which mean literal '[' and ']')
This commit is contained in:
parent
a344ae8fec
commit
1799b75947
8
acme.sh
8
acme.sh
@ -438,12 +438,12 @@ _secure_debug3() {
|
||||
|
||||
_upper_case() {
|
||||
# shellcheck disable=SC2018,SC2019
|
||||
tr '[a-z]' '[A-Z]'
|
||||
tr 'a-z' 'A-Z'
|
||||
}
|
||||
|
||||
_lower_case() {
|
||||
# shellcheck disable=SC2018,SC2019
|
||||
tr '[A-Z]' '[a-z]'
|
||||
tr 'A-Z' 'a-z'
|
||||
}
|
||||
|
||||
_startswith() {
|
||||
@ -1186,7 +1186,7 @@ _createkey() {
|
||||
_is_idn() {
|
||||
_is_idn_d="$1"
|
||||
_debug2 _is_idn_d "$_is_idn_d"
|
||||
_idn_temp=$(printf "%s" "$_is_idn_d" | tr -d '[0-9]' | tr -d '[a-z]' | tr -d '[A-Z]' | tr -d '*.,-_')
|
||||
_idn_temp=$(printf "%s" "$_is_idn_d" | tr -d '0-9' | tr -d 'a-z' | tr -d 'A-Z' | tr -d '*.,-_')
|
||||
_debug2 _idn_temp "$_idn_temp"
|
||||
[ "$_idn_temp" ]
|
||||
}
|
||||
@ -4247,7 +4247,7 @@ _match_issuer() {
|
||||
_isIPv4() {
|
||||
for seg in $(echo "$1" | tr '.' ' '); do
|
||||
_debug2 seg "$seg"
|
||||
if [ "$(echo "$seg" | tr -d '[0-9]')" ]; then
|
||||
if [ "$(echo "$seg" | tr -d '0-9')" ]; then
|
||||
#not all number
|
||||
return 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user