[Mantis 21439] Input documents can be downloaded via its URL even if there is no valid session
This commit is contained in:
dheeyi william
2017-03-09 18:09:33 -04:00
parent 4a9dad1879
commit 2aa1abd7de
3 changed files with 69 additions and 1 deletions

View File

@@ -51,6 +51,12 @@ if (isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession"
//a = Case UID
$oAppDocument = new AppDocument();
if (!$oAppDocument->checkPermissionsToDownload($_SESSION['USER_LOGGED'], $_GET['a'], $_GET['v'])) {
G::header('Location: /errors/error403.php');
die();
}
if (! isset( $_GET['v'] )) {
//Load last version of the document
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );