fix IDN conversion failure for some emoji domains
For example: 🦈🖥.ws
This commit is contained in:
parent
77b61c8fc0
commit
ccfc936c4a
|
@ -67,7 +67,7 @@ while read -r host; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Hostname to punycode.
|
# Hostname to punycode.
|
||||||
host=$(echo "$host" | idn)
|
host=$(echo "$host" | idn --allow-unassigned)
|
||||||
|
|
||||||
# Hostname to lowercase.
|
# Hostname to lowercase.
|
||||||
host=$(echo "$host" | tr '[:upper:]' '[:lower:]')
|
host=$(echo "$host" | tr '[:upper:]' '[:lower:]')
|
||||||
|
@ -117,7 +117,7 @@ while read -r host; do
|
||||||
# If we got a cert back, then the host and port were valid,
|
# If we got a cert back, then the host and port were valid,
|
||||||
# so they are safe to include in a file name.
|
# so they are safe to include in a file name.
|
||||||
# Convert from punycode to unicode, if needed.
|
# Convert from punycode to unicode, if needed.
|
||||||
host_and_port=$(echo "$host_and_port" | idn --idna-to-unicode)
|
host_and_port=$(echo "$host_and_port" | idn --allow-unassigned --idna-to-unicode)
|
||||||
echo "$cert" > "certs/${host_and_port}.pem"
|
echo "$cert" > "certs/${host_and_port}.pem"
|
||||||
printf ' - OK'
|
printf ' - OK'
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue