From 21e1912fd507e2e0b1b80ea66890274a0ec441f4 Mon Sep 17 00:00:00 2001 From: dante Date: Fri, 20 Oct 2017 14:38:08 -0400 Subject: [PATCH] moving sanitization to file names of output documents only --- gulliver/system/class.g.php | 4 ++-- workflow/engine/methods/cases/cases_ShowOutputDocument.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 1b5b41ffe..096906d9b 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -1250,9 +1250,9 @@ class G $aAux = explode('/', $filename); $downloadFileName = $aAux[count($aAux) - 1]; } - header('Content-Disposition: attachment; filename="' . static::inflect($downloadFileName) . '"'); + header('Content-Disposition: attachment; filename="' . $downloadFileName . '"'); } else { - header('Content-Disposition: inline; filename="' . static::inflect($downloadFileName) . '"'); + header('Content-Disposition: inline; filename="' . $downloadFileName . '"'); } header('Content-Type: ' . $contentType); diff --git a/workflow/engine/methods/cases/cases_ShowOutputDocument.php b/workflow/engine/methods/cases/cases_ShowOutputDocument.php index 9436daea4..b9566e088 100644 --- a/workflow/engine/methods/cases/cases_ShowOutputDocument.php +++ b/workflow/engine/methods/cases/cases_ShowOutputDocument.php @@ -159,7 +159,7 @@ if (!$sw_file_exists) { } /*----------------------------------********---------------------------------*/ if (!$downloadStatus) { - G::streamFile( $realPath, $download, $nameFile); //download + G::streamFile( $realPath, $download, G::inflect( $nameFile)); //download } } }