From 31e3e9d3175c43e9c16ae9e8b571d79bf80c7623 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 11 Jan 2021 12:18:00 +0100 Subject: [PATCH] Properly detect EOF in SmtpEmailTransport::read() --- .../lib/system/email/transport/SmtpEmailTransport.class.php | 4 ++++ 1 file changed, 4 insertions(+) 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."); } } -- 2.20.1