MDL-47868 ws: verify upload areas
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
7ee4642bcb
commit
76ae1f6068
@@ -68,6 +68,11 @@ if ($fileuploaddisabled) {
|
||||
$context = context_user::instance($USER->id);
|
||||
require_capability('moodle/user:manageownfiles', $context);
|
||||
|
||||
if ($filearea !== 'private' and $filearea !== 'draft') {
|
||||
// Do not dare to allow more areas here!
|
||||
throw new file_exception('error');
|
||||
}
|
||||
|
||||
$fs = get_file_storage();
|
||||
|
||||
$totalsize = 0;
|
||||
|
||||
Reference in New Issue
Block a user