diff --git a/.jenkins/configuration/default-environment/unattended_install/default-config-itop.php b/.jenkins/configuration/default-environment/unattended_install/default-config-itop.php index adb939864..6caa3061e 100644 --- a/.jenkins/configuration/default-environment/unattended_install/default-config-itop.php +++ b/.jenkins/configuration/default-environment/unattended_install/default-config-itop.php @@ -94,10 +94,6 @@ $MySettings = array( 'default_language' => 'EN US', - // disable_attachments_download_legacy_portal: Disable attachments download from legacy portal - // default: true - 'disable_attachments_download_legacy_portal' => true, - // draft_attachments_lifetime: Lifetime (in seconds) of drafts' attachments and inline images: after this duration, the garbage collector will delete them. // default: 3600 'draft_attachments_lifetime' => 3600, diff --git a/core/config.class.inc.php b/core/config.class.inc.php index 8e9e246e3..94268e20a 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -1,20 +1,23 @@ +/** + * Copyright (C) 2013-2019 Combodo SARL + * + * This file is part of iTop. + * + * iTop is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * iTop is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * + * + */ define('ITOP_APPLICATION', 'iTop'); @@ -1116,14 +1119,6 @@ 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, - ), 'secure_rest_services' => array( 'type' => 'bool', 'description' => 'When set to true, only the users with the profile "REST Services User" are allowed to use the REST web services.', @@ -1183,6 +1178,7 @@ class Config * @return string identifier that can be used for example to name WebStorage/SessionStorage keys (they * are related to a whole domain, and a domain can host multiple itop) * Beware: do not expose server side information to the client ! + * @throws \Exception */ public function GetItopInstanceid() { diff --git a/pages/ajax.document.php b/pages/ajax.document.php index df9cd2225..b90e8d8cd 100644 --- a/pages/ajax.document.php +++ b/pages/ajax.document.php @@ -1,27 +1,22 @@ - - /** - * Handles various ajax requests + * Copyright (C) 2013-2019 Combodo SARL + * + * This file is part of iTop. + * + * iTop is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * iTop is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * * - * @copyright Copyright (C) 2010-2016 Combodo SARL - * @license http://opensource.org/licenses/AGPL-3.0 */ require_once('../approot.inc.php'); @@ -53,9 +48,7 @@ try switch($operation) { 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; - LoginWebPage::DoLoginEx($sRequestedPortalId, false); + LoginWebPage::DoLoginEx('backoffice', false); $id = utils::ReadParam('id', ''); $sField = utils::ReadParam('field', ''); if ($sClass == 'Attachment') diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 2f5c573d5..ad58b01a5 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -1,27 +1,22 @@ - - /** - * Handles various ajax requests + * Copyright (C) 2013-2019 Combodo SARL + * + * This file is part of iTop. + * + * iTop is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * iTop is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * * - * @copyright Copyright (C) 2010-2017 Combodo SARL - * @license http://opensource.org/licenses/AGPL-3.0 */ require_once('../approot.inc.php'); @@ -66,7 +61,8 @@ try break; default: - $sRequestedPortalId = (MetaModel::GetConfig()->Get('disable_attachments_download_legacy_portal') === true) ? 'backoffice' : null; + $sRequestedPortalId = 'backoffice'; + break; } LoginWebPage::DoLoginEx($sRequestedPortalId, false);