summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-04-06 11:44:51 +0200
committerGitHub <noreply@github.com>2018-04-06 11:44:51 +0200
commitb9ca1216712f9eff0471ac58d49b8ee8391a5d28 (patch)
tree8b31dc2a9822f722db3c1796691b6c5bffef237b /lib
parent80c5eda800cd73e5fba130b3521966da6b5104dc (diff)
parent52c7f17faf347e10c8b2c89819c8fdb4de3ad4ee (diff)
downloadnextcloud-server-b9ca1216712f9eff0471ac58d49b8ee8391a5d28.tar.gz
nextcloud-server-b9ca1216712f9eff0471ac58d49b8ee8391a5d28.zip
Merge pull request #9095 from JaredBoone/bugfix/8387
Do not convert email addresses with idn_to_ascii if…
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Mail/Mailer.php2
-rw-r--r--lib/private/Mail/Message.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 3637bb1e27d..0590f3db12a 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -204,7 +204,7 @@ class Mailer implements IMailer {
* @return string Converted mail address if `idn_to_ascii` exists
*/
protected function convertEmail($email) {
- 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 c695f0f4fb1..4d9458fbd40 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -65,7 +65,7 @@ class Message implements IMessage {
* @return array Converted addresses if `idn_to_ascii` exists
*/
protected function convertAddresses($addresses) {
- if (!function_exists('idn_to_ascii')) {
+ if (!function_exists('idn_to_ascii') || !defined('INTL_IDNA_VARIANT_UTS46')) {
return $addresses;
}