From 2972f7e0d8956d09399a80a769a2d29c0866011d Mon Sep 17 00:00:00 2001 From: chaitanya <chaitanya@vtiger-Latitude-5420> Date: Mon, 29 Apr 2024 11:43:00 +0530 Subject: [PATCH] Revert "#Fixes::158429927::Chaitanya N::Unrestricted file upload in company logo(htaccess) is fixed" This reverts commit be6ad20aaa6ecef36a565da1293893651350252e. --- modules/Migration/schema/800_to_810.php | 33 ------------------------- 1 file changed, 33 deletions(-) delete mode 100644 modules/Migration/schema/800_to_810.php diff --git a/modules/Migration/schema/800_to_810.php b/modules/Migration/schema/800_to_810.php deleted file mode 100644 index c9bf4d9e8..000000000 --- a/modules/Migration/schema/800_to_810.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/*+******************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - *********************************************************************************/ - -if (defined('VTIGER_UPGRADE')) { - - //updating the config file - $fileName = 'config.inc.php'; - if (file_exists($fileName)) { - // Read the contents of the file - $completeData = file_get_contents('config.inc.php'); - $pattern = "/upload_badext\s*=+\s*array\(?...+\);/i"; - - if (preg_match($pattern, $completeData, $matches)) { - $arrayString = $matches[0]; - $content = '/htaccess/i'; - - if (!preg_match($content, $arrayString)) { - $updateStringPattern = "/upload_badext\s*=+\s*array\(?...+'/i"; - preg_match($updateStringPattern,$completeData,$matches); - $updatedContent = preg_replace($updateStringPattern, "$matches[0],'htaccess'", $completeData); - //Put the new contents into the file - file_put_contents($fileName, $updatedContent); - } - } - } -} -- GitLab