mirror of
https://github.com/getgrav/grav.git
synced 2026-07-04 09:29:42 +02:00
missed a check in MediaUploadTrait::checkFileMetadata()
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user