summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-10-30 10:50:42 +0100
committerGitHub <noreply@github.com>2023-10-30 10:50:42 +0100
commit19c4fca0cc7ec6619a96f820398478bc0c49819d (patch)
tree4ac75206f731a4637ac24e4971b976d197d86d33
parent5e6280d757b72e2253b117d37f31b6e4ce9ed8ad (diff)
parent71725553f2198e8728aa1d3a61c27952f12a63f5 (diff)
downloadnextcloud-server-19c4fca0cc7ec6619a96f820398478bc0c49819d.tar.gz
nextcloud-server-19c4fca0cc7ec6619a96f820398478bc0c49819d.zip
Merge pull request #41186 from nextcloud/backport/41120/stable27
[stable27] Don't pass invalid streams to Imaginary
-rw-r--r--lib/private/Preview/Imaginary.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Preview/Imaginary.php b/lib/private/Preview/Imaginary.php
index 291d983e1c3..16b16470078 100644
--- a/lib/private/Preview/Imaginary.php
+++ b/lib/private/Preview/Imaginary.php
@@ -78,6 +78,9 @@ class Imaginary extends ProviderV2 {
// Object store
$stream = $file->fopen('r');
+ if (!$stream || !is_resource($stream) || feof($stream)) {
+ return null;
+ }
$httpClient = $this->service->newClient();