catalyst / totara-mod-ojt

https://github.com/catalyst/totara-mod-ojt/wiki
5 stars 21 forks source link

Restrict upload by file types #25

Open sergeyandrogogic opened 4 years ago

sergeyandrogogic commented 4 years ago

Not exactly an issue, but rather a suggestion, related to this issue. How about we disallow HTML/JS for upload completely? I can't see any compelling reason for them to be there in the first place.

I'm proposing something like this for mod/ojt/uploadfile.php:

$fileoptions['accepted_types'] = array( 'video', 'audio', 'archive', 'spreadsheet', 'presentation', 'document', 'image', );