Skip to content

Commit 44d9c46

Browse files
authored
Fix: idn2: toAscii: A-label roundtrip failed (hestiacp#3942)
* Fix: idn2: toAscii: A-label roundtrip failed v-genereate-ssl-cert uses if [[ "$email" = *[![:ascii:]]* ]]; then email=$(idn2 --quiet $email) fi This is not really needed and causes the listed error * Convert email correctly * Remove echo
1 parent 32c6580 commit 44d9c46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/v-generate-ssl-cert

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ shell_list_ssl() {
6262
# Additional argument formatting
6363
format_domain_idn
6464
if [[ "$email" = *[![:ascii:]]* ]]; then
65-
email=$(idn2 --quiet $email)
65+
local=$(echo "$email" | cut -f1 -d'@')
66+
email_domain=$(echo "$email" | cut -f2 -d'@')
67+
email_domain_idn=$(idn2 --quiet $email_domain)
68+
email="$local"@"$email_domain_idn"
6669
fi
6770

6871
#----------------------------------------------------------#

0 commit comments

Comments
 (0)