From eb43a02bce653c658d5b04a85ac81e4530cae7d3 Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Mon, 8 Jan 2018 12:40:05 +0000 Subject: [PATCH] Fix regression introduced in r5183. SVN:trunk[5211] --- pages/ajax.document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/ajax.document.php b/pages/ajax.document.php index 681f81653..35f9bcd05 100644 --- a/pages/ajax.document.php +++ b/pages/ajax.document.php @@ -54,7 +54,7 @@ try { case 'download_document': // Fixing security hole from bug N°1227, disabling by default attachment from legacy portal. - $sRequestedPortalId = (MetaModel::GetConfig()->Get('disable_attachments_download_legacy_portal') === true) ? 'backoffice' : null; + $sRequestedPortalId = ((MetaModel::GetConfig()->Get('disable_attachments_download_legacy_portal') === true) && ($sClass === 'Attachment')) ? 'backoffice' : null; LoginWebPage::DoLoginEx($sRequestedPortalId, false); $id = utils::ReadParam('id', ''); $sField = utils::ReadParam('field', '');