From 78d521af07875edc2bb35fc85d79e21fb7576565 Mon Sep 17 00:00:00 2001 From: Andrea Adamczyk Date: Thu, 7 Jan 2021 11:40:27 -0400 Subject: [PATCH] PMCORE-2683 --- workflow/engine/methods/cases/cases_ShowDocument.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workflow/engine/methods/cases/cases_ShowDocument.php b/workflow/engine/methods/cases/cases_ShowDocument.php index 768e5a814..c5a544c23 100644 --- a/workflow/engine/methods/cases/cases_ShowDocument.php +++ b/workflow/engine/methods/cases/cases_ShowDocument.php @@ -1,4 +1,5 @@ userCanAccess('PM_FOLDERS_ALL') != 1 && defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION == 0; if ($access && $isGuestUser === false) { - if (!$oAppDocument->canDownloadInput($_SESSION['USER_LOGGED'], $_GET['a'], $docVersion)) { + if (isset($_SESSION['USER_LOGGED']) && !$oAppDocument->canDownloadInput($_SESSION['USER_LOGGED'], $_GET['a'], $docVersion)) { G::header('Location: /errors/error403.php?url=' . urlencode($_SERVER['REQUEST_URI'])); die(); } @@ -131,4 +132,4 @@ if (!$sw_file_exists) { G::streamFile($realPath, $bDownload, $nameFile); //download } } -} \ No newline at end of file +}