Răsfoiți Sursa

Fix: idn2: toAscii: A-label roundtrip failed (#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
Jaap Marcus 2 ani în urmă
părinte
comite
a66b552ec7
1 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 4 1
      bin/v-generate-ssl-cert

+ 4 - 1
bin/v-generate-ssl-cert

@@ -62,7 +62,10 @@ shell_list_ssl() {
 # Additional argument formatting
 format_domain_idn
 if [[ "$email" = *[![:ascii:]]* ]]; then
-	email=$(idn2 --quiet $email)
+	local=$(echo "$email" | cut -f1 -d'@')
+	email_domain=$(echo "$email" | cut -f2 -d'@')
+	email_domain_idn=$(idn2 --quiet $email_domain)
+	email="$local"@"$email_domain_idn"
 fi
 
 #----------------------------------------------------------#