aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2023-10-25 19:47:03 +0200
committerGit'Fellow <12234510+solracsf@users.noreply.github.com>2023-10-25 21:58:46 +0200
commit974e86e618fcfbe0eda38208baec58118d18d581 (patch)
tree4f5e9535ad89cdf95aa13a8788d4ba31a0080bdf /lib/private/Preview
parent0753085e3203a6493a7bf86410163441aa5a2722 (diff)
downloadnextcloud-server-974e86e618fcfbe0eda38208baec58118d18d581.tar.gz
nextcloud-server-974e86e618fcfbe0eda38208baec58118d18d581.zip
Don't pass invalid streams to Imaginary
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Update Imaginary.php Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Update Imaginary.php Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'lib/private/Preview')
-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 7184f7e9e76..830c88793be 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();