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 <jared.boone@gmail.com>
This commit is contained in:
parent
bbc4c6036a
commit
a5b50e487e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue