]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't pass invalid streams to Imaginary 41185/head
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>
Wed, 25 Oct 2023 17:47:03 +0000 (19:47 +0200)
committerGit'Fellow <12234510+solracsf@users.noreply.github.com>
Tue, 14 Nov 2023 22:12:09 +0000 (23:12 +0100)
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>
lib/private/Preview/Imaginary.php

index 1375857c2102e91d3daa5508d2a10091afa301b8..7b8064916495f1ddba4d4d6c8b81fe41fae87bae 100644 (file)
@@ -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();