diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2018-04-06 10:36:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 10:36:07 +0200 |
commit | 50442b265d676a37babd723386d90bbeda5d6670 (patch) | |
tree | 26d50e6056ee4f0b4900eb51a7251afcab388cc3 | |
parent | b19735fb84d9f1fefa6b7e55bd94be63b1978a29 (diff) | |
parent | a5b50e487eb96786db0a3ff828ed7c84040f664c (diff) | |
download | nextcloud-server-50442b265d676a37babd723386d90bbeda5d6670.tar.gz nextcloud-server-50442b265d676a37babd723386d90bbeda5d6670.zip |
Merge pull request #9100 from JaredBoone/bugfix/8387-master
Do not convert email addresses with idn_to_ascii if INTL_IDNA_VARIANT…
-rw-r--r-- | lib/private/Mail/Mailer.php | 2 | ||||
-rw-r--r-- | lib/private/Mail/Message.php | 2 |
2 files changed, 2 insertions, 2 deletions
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; } diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php index 622c18a9116..7c7ecae8578 100644 --- a/lib/private/Mail/Message.php +++ b/lib/private/Mail/Message.php @@ -66,7 +66,7 @@ class Message implements IMessage { * @return array Converted addresses if `idn_to_ascii` exists */ protected function convertAddresses(array $addresses): array { - if (!function_exists('idn_to_ascii')) { + if (!function_exists('idn_to_ascii') || !defined('INTL_IDNA_VARIANT_UTS46')) { return $addresses; } |