mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #58815 from nextcloud/s32ValidatePrevMime
fix(preview): Validate preview MIME type
This commit is contained in:
commit
8d397818a3
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