Skip to content

Commit 124711d

Browse files
committed
Merge remote-tracking branch 'upstream/5.2-dev' into 5.3-dev-upmerge-2025-03-11
2 parents 823f572 + 9d40471 commit 124711d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/filesystem/local/src/Adapter/LocalAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,10 @@ private function copyFile(string $sourcePath, string $destinationPath, bool $for
531531
$destinationPath .= '/' . $this->getFileName($sourcePath);
532532
}
533533

534+
if (!MediaHelper::checkFileExtension(pathinfo($destinationPath, PATHINFO_EXTENSION))) {
535+
throw new \Exception(Text::_('COM_MEDIA_MOVE_FILE_EXTENSION_INVALID'));
536+
}
537+
534538
if (file_exists($destinationPath) && !$force) {
535539
throw new \Exception(Text::_('COM_MEDIA_COPY_FILE_NOT_POSSIBLE_FILE_ALREADY_EXISTS'));
536540
}

0 commit comments

Comments
 (0)