Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes links to BrainBrowser from the MRI violations module #8392

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/brainbrowser/php/imageinfo.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class ImageInfo extends \NDB_Page
'' as Visit_label,
MincFile as File,
LogID as FileID
FROM mri_violation_log
FROM mri_violations_log
WHERE LogID IN (" . join(",", $params) .")";
break;
case 'CandidateError':
Expand Down
4 changes: 3 additions & 1 deletion php/libraries/FilesDownloadHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public function handle(ServerRequestInterface $request) : ResponseInterface
);
}
//Use basename to remove path traversal characters.
$filename = basename(strval($request->getAttribute('filename')));
$filename = \Utility::resolvePath(
strval($request->getAttribute('filename'))
);

if (empty($filename)) {
return new \LORIS\Http\Response\JSON\BadRequest(
Expand Down