Skip to content
Snippets Groups Projects
Commit ef16c941 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't allow downloads form non-accessible directories.

Double-check that the user has access to both the directory and the containing
library before allowing a download a file.
parent f127fa29
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') &&
case 'download-file':
if (typeof http_request.query.dir !== 'undefined' &&
typeof file_area.dir[http_request.query.dir[0]] !== 'undefined' &&
file_area.dir[http_request.query.dir[0]].lib_index >= 0 &&
file_area.dir[http_request.query.dir[0]].index >= 0 &&
file_area.dir[http_request.query.dir[0]].can_download &&
typeof http_request.query.file !== 'undefined'
) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment