Allow the site to restrict what files are allowed to be uploaded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Mahara |
Wishlist
|
Robert Lyon |
Bug Description
Currently a site can allow users to upload any file type.
But in some cases Mahara sites would want to restrict what can be uploaded to avoid users uploading malicious files or files that serve no purpose for portfolio creation, eg .bat or .exe files
To avoid this we could have a config.php setting that whitelists what file extensions are ok and display to the user what files extensions are allowed
Reviewed: https:/
Committed: https:/
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master
commit a064f3d60cc5ee7
Author: Robert Lyon <email address hidden>
Date: Fri Dec 6 12:33:53 2019 +1300
Bug 1855351: Allow restriction of file uploads to a whitelist
This patch allows:
- the setting of a whitelist via a config setting
- check if file extension is in the whitelist
- check if the mimetype matches expected mimetype
behatnotneeded
Change-Id: Ie20726870d45e5
Signed-off-by: Robert Lyon <email address hidden>
Changed in mahara: | |
status: | In Progress → Fix Committed |
tags: | added: nominatedfeature |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/10645