missed a check in MediaUploadTrait::checkFileMetadata()

This commit is contained in:
Andy Miller 2024-05-06 11:31:23 +01:00
parent ee8d783d05
commit 77adfcb831
No known key found for this signature in database
GPG Key ID: 9F2CF38AEBDB0AE0
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
* Better handling of external protocols in `Utils::url()` such as `mailto:`, `tel:`, etc.
1. [](#bugfix)
* Fixes for multi-lang taxonomy when reinitializing the languages (e.g. LangSwitcher plugin)
* Ensure the full filepath is checked for invalid filename in `Utils::checkFileMetadata()`
# v1.7.45
## 03/18/2024

View File

@ -156,7 +156,7 @@ trait MediaUploadTrait
$filepath = $folder . $filename;
// Check if the filename is allowed.
if (!Utils::checkFilename($filename)) {
if (!Utils::checkFilename($filepath)) {
throw new RuntimeException(
sprintf($this->translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_UPLOAD'), $filepath, $this->translate('PLUGIN_ADMIN.BAD_FILENAME'))
);