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
|
||||
|
||||
# Hostname to punycode.
|
||||
host=$(echo "$host" | idn)
|
||||
host=$(echo "$host" | idn --allow-unassigned)
|
||||
|
||||
# Hostname to lowercase.
|
||||
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,
|
||||
# so they are safe to include in a file name.
|
||||
# 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"
|
||||
printf ' - OK'
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue