From 72ec20edc2603f9aec9cae29c2bce31cf8701320 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Wed, 9 Jun 2021 07:29:25 +0200 Subject: [PATCH] Issue 269: Fix CVE-2021-3007 More information about fix: https://github.com/laminas/laminas-http/pull/48 --- .../zendframework/library/Zend/Http/Response/Stream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/zendframework/zendframework/library/Zend/Http/Response/Stream.php b/vendor/zendframework/zendframework/library/Zend/Http/Response/Stream.php index dbb1ea7607..7362c1e1c8 100644 --- a/vendor/zendframework/zendframework/library/Zend/Http/Response/Stream.php +++ b/vendor/zendframework/zendframework/library/Zend/Http/Response/Stream.php @@ -288,7 +288,7 @@ public function __destruct() if (is_resource($this->stream)) { $this->stream = null; //Could be listened by others } - if ($this->cleanup) { + if ($this->cleanup && is_string($this->streamName) && file_exists($this->streamName)) { ErrorHandler::start(E_WARNING); unlink($this->streamName); ErrorHandler::stop();