mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(previex): Validate preview MIME type
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
50f27f3d89
commit
1d932cfa4a
1 changed files with 3 additions and 0 deletions
|
|
@ -535,6 +535,9 @@ class Generator {
|
|||
self::unguardWithSemaphore($sem);
|
||||
}
|
||||
|
||||
if (!$preview->valid() || $preview->dataMimeType() === null) {
|
||||
throw new \InvalidArgumentException('Preview generation failed: invalid or null MIME type');
|
||||
}
|
||||
|
||||
$path = $this->generatePath($width, $height, $crop, false, $preview->dataMimeType(), $prefix);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue