From a5b50e487eb96786db0a3ff828ed7c84040f664c Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 5 Apr 2018 16:09:08 -0700 Subject: Do not convert email addresses with idn_to_ascii if INTL_IDNA_VARIANT_UTS46 is undefined. Fixes https://github.com/nextcloud/server/issues/8387. Signed-off-by: Jared Boone --- lib/private/Mail/Mailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Mail/Mailer.php') diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index 5a054d2efd2..d55546769ee 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -205,7 +205,7 @@ class Mailer implements IMailer { * @return string Converted mail address if `idn_to_ascii` exists */ protected function convertEmail(string $email): string { - if (!function_exists('idn_to_ascii') || strpos($email, '@') === false) { + if (!function_exists('idn_to_ascii') || !defined('INTL_IDNA_VARIANT_UTS46') || strpos($email, '@') === false) { return $email; } -- cgit v1.2.3