mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
(Retrofit from trunk) N°1227 New configuration parameter (disable_attachments_download_legacy_portal) to disable attachments download from the legacy portal. Default is "true"!
SVN:2.4[5184]
This commit is contained in:
@@ -962,6 +962,14 @@ class Config
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => false,
|
||||
),
|
||||
'disable_attachments_download_legacy_portal' => array(
|
||||
'type' => 'bool',
|
||||
'description' => 'Disable attachments download from legacy portal',
|
||||
'default' => true,
|
||||
'value' => true,
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => true,
|
||||
),
|
||||
);
|
||||
|
||||
public function IsProperty($sPropCode)
|
||||
|
||||
@@ -53,7 +53,9 @@ try
|
||||
switch($operation)
|
||||
{
|
||||
case 'download_document':
|
||||
LoginWebPage::DoLoginEx(null /* any portal */, false);
|
||||
// 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;
|
||||
LoginWebPage::DoLoginEx($sRequestedPortalId, false);
|
||||
$id = utils::ReadParam('id', '');
|
||||
$sField = utils::ReadParam('field', '');
|
||||
if ($sClass == 'Attachment')
|
||||
|
||||
Reference in New Issue
Block a user