From: Tim Düsterhus Date: Mon, 11 Jan 2021 11:18:00 +0000 (+0100) Subject: Properly detect EOF in SmtpEmailTransport::read() X-Git-Tag: 5.3.3~30^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31e3e9d3175c43e9c16ae9e8b571d79bf80c7623;p=GitHub%2FWoltLab%2FWCF.git Properly detect EOF in SmtpEmailTransport::read() --- diff --git a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php index d68d456d58..59e710f49b 100644 --- a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php +++ b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php @@ -201,6 +201,10 @@ class SmtpEmailTransport implements IEmailTransport { } } else { + if ($this->connection->eof()) { + throw new TransientFailure("Unexpected EOF / connection close from SMTP server."); + } + throw new TransientFailure("Unexpected reply '".$data."' from SMTP server."); } }