From 2d2c47c6d9b72b0835bc6439c221425030edc8ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 21 Sep 2017 14:40:38 +0200 Subject: [PATCH] Support 8-bit domains in Mailbox --- .../files/lib/system/email/Mailbox.class.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/wcfsetup/install/files/lib/system/email/Mailbox.class.php b/wcfsetup/install/files/lib/system/email/Mailbox.class.php index d837f05510..a680cb825c 100644 --- a/wcfsetup/install/files/lib/system/email/Mailbox.class.php +++ b/wcfsetup/install/files/lib/system/email/Mailbox.class.php @@ -1,5 +1,6 @@ encode($domain); + + // ... and rebuild address. + $address = $localpart.'@'.$domain; + if (!preg_match('(^'.EmailGrammar::getGrammar('addr-spec').'$)', $address)) { throw new \DomainException("The given email address '".$address."' is invalid."); } -- 2.20.1