Learnpath: Fix special character when importing scorm with bigupload - refs #4650

pull/4651/head
Christian 3 years ago
parent f8d12645f7
commit 7ca2c5eaa7
  1. 4
      main/inc/lib/javascript/bigupload/inc/bigUpload.php
  2. 1
      main/lp/scorm.class.php

@ -64,7 +64,9 @@ class BigUploadResponse
$this->tempName = $value;
} else {
if ('learnpath' === $_REQUEST['origin'] && !empty($_REQUEST['name'])) {
$this->tempName = $_REQUEST['name'];
$this->tempName = disable_dangerous_file(
api_replace_dangerous_char($_REQUEST['name'])
);
} else {
$this->tempName = mt_rand().'.tmp';
}

@ -720,6 +720,7 @@ class scorm extends learnpath
if ($updateDirContents && $lpToCheck) {
$originalPath = str_replace('/.', '', $lpToCheck->path);
$originalPath = dirname($originalPath);
if ($originalPath != $newDir) {
Display::addFlash(Display::return_message(get_lang('FileError')));

Loading…
Cancel
Save