N°2323 - Fix calls to ajax endpoints

This commit is contained in:
Eric
2019-06-17 15:47:37 +02:00
parent dac77e0606
commit c723d19e01
2 changed files with 16 additions and 3 deletions

View File

@@ -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) && ($sClass === 'Attachment')) ? 'backoffice' : null;
$sRequestedPortalId = (MetaModel::GetConfig()->Get('disable_attachments_download_legacy_portal') === true) ? 'backoffice' : null;
LoginWebPage::DoLoginEx($sRequestedPortalId, false);
$id = utils::ReadParam('id', '');
$sField = utils::ReadParam('field', '');