Skip to content

Commit c32499e

Browse files
committed
Disable upload of application, html and javascript
1 parent 9034c03 commit c32499e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,19 @@ public function getConfiguration()
4444
// Adding user personal files
4545
$dir = \UserManager::getUserPathById($userId, 'system');
4646
$dirWeb = \UserManager::getUserPathById($userId, 'web');
47+
$mimeType =[];
48+
$mimeType[] = 'application';
49+
$mimeType[] = 'text/html';
50+
$mimeType[] = 'text/javascript';
51+
$mimeType[] = 'text/ecmascript';
4752

4853
$driver = [
4954
'driver' => 'PersonalDriver',
5055
'alias' => get_lang('MyFiles'),
5156
'path' => $dir.'my_files',
5257
'URL' => $dirWeb.'my_files',
5358
'accessControl' => [$this, 'access'],
59+
'uploadDeny' => $mimeType,
5460
'disabled' => [
5561
'duplicate',
5662
//'rename',

0 commit comments

Comments
 (0)