MDL-78442 tool_moodlenet: Fix directory path passed to antivirus scanner
This commit is contained in:
@@ -86,7 +86,7 @@ class import_backup_helper {
|
||||
}
|
||||
|
||||
[$filepath, $filename] = $this->remoteresource->download_to_requestdir();
|
||||
\core\antivirus\manager::scan_file($filepath, $filename, true);
|
||||
\core\antivirus\manager::scan_file($filepath . DIRECTORY_SEPARATOR . $filename, $filename, true);
|
||||
|
||||
// Check the final size of file against the user upload limits.
|
||||
$localsize = filesize(sprintf('%s/%s', $filepath, $filename));
|
||||
|
||||
@@ -78,7 +78,7 @@ class import_strategy_file implements import_strategy {
|
||||
|
||||
// Download the file into a request directory and scan it.
|
||||
[$filepath, $filename] = $resource->download_to_requestdir();
|
||||
avmanager::scan_file($filepath, $filename, true);
|
||||
avmanager::scan_file($filepath . DIRECTORY_SEPARATOR . $filename, $filename, true);
|
||||
|
||||
// Check the final size of file against the user upload limits.
|
||||
$localsize = filesize(sprintf('%s/%s', $filepath, $filename));
|
||||
|
||||
Reference in New Issue
Block a user