Fix Shellcheck SC2021

This commit fixes Shellecheck issue SC2021 by not enclosing list of characters in "[...]' for the 'tr' command.
This commit is contained in:
David Cooper
2026-09-13 14:52:31 -07:00
committed by GitHub
parent 98bd9d66a4
commit bce32ae78c
+1 -1
View File
@@ -23429,7 +23429,7 @@ determine_rdns() {
# circumstances (see #1506) can show up here. The blacklist is taken from RFC 1912 ("Allowable characters in a
# label for a host name are only ASCII, letters, digits, and the `-' character")
while read -r line; do
line="$(tr -dc '[a-zA-Z0-9-_.]' <<< "$line")"
line="$(tr -dc 'a-zA-Z0-9-_.' <<< "$line")"
[[ -z "$rdns" ]] && rdns="$line" || rdns="$rdns $line"
done <<< "$rDNS"
rDNS="$rdns"