Skip to content

Commit

Permalink
Merge pull request #41185 from nextcloud/backport/41120/stable26
Browse files Browse the repository at this point in the history
[stable26] Don't pass invalid streams to Imaginary
  • Loading branch information
blizzz authored Nov 15, 2023
2 parents c8f1141 + f29b3be commit 84210b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/private/Preview/Imaginary.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function getCroppedThumbnail(File $file, int $maxX, int $maxY, bool $crop

// Object store
$stream = $file->fopen('r');
if (!$stream || !is_resource($stream) || feof($stream)) {
return null;
}

$httpClient = $this->service->newClient();

Expand Down

0 comments on commit 84210b3

Please sign in to comment.