From 486f2c5a2ba9e8de1fbac94b4ce2d814957765e0 Mon Sep 17 00:00:00 2001 From: Sezil <72402109+Sezil@users.noreply.github.com> Date: Wed, 2 Nov 2022 13:25:27 +0100 Subject: [PATCH] [Mailer] Stream timeout not detected due to checking only string result of function fgets --- .../Component/Mailer/Transport/Smtp/Stream/AbstractStream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php index 2b8afd4c6fa67..804b339503161 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php @@ -75,7 +75,7 @@ public function readLine(): string } $line = fgets($this->out); - if ('' === $line) { + if ('' === $line || false === $line) { $metas = stream_get_meta_data($this->out); if ($metas['timed_out']) { throw new TransportException(sprintf('Connection to "%s" timed out.', $this->getReadConnectionDescription()));
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: