diff --git a/application/controllers/admin/responses.php b/application/controllers/admin/responses.php index 6bd41f30d21..16aca2ee5a4 100644 --- a/application/controllers/admin/responses.php +++ b/application/controllers/admin/responses.php @@ -640,7 +640,7 @@ public function actionDownloadfile($iSurveyId, $iResponseId, $iQID, $iIndex) $sFileRealName = $sDir . $aFile['filename']; $sRealUserPath = realpath($sFileRealName); if ($sRealUserPath === false || strpos($sRealUserPath, $sDir) !== 0) { - throw new Exception('Directory traversal detected, aborted'); + throw new CHttpException(403, "Disable for security reasons."); } else { $mimeType = CFileHelper::getMimeType($sFileRealName, null, false); if (is_null($mimeType)) {