diff --git a/cgsecureinstaller.xml b/cgsecureinstaller.xml index cd3c389..cf1fa43 100644 --- a/cgsecureinstaller.xml +++ b/cgsecureinstaller.xml @@ -2,12 +2,12 @@ plgcgsecureinstaller ConseilGouz - 2024-03-11 + 2024-03-13 (C)2024 ConseilGouz. All rights reserved. GNU General Public License version 3 or later; see LICENSE.txt pascal.leconte@conseilgouz.com www.conseilgouz.com - 3.0.11 + 3.0.12 CG Secure script.install.php diff --git a/com_cgsecure_changelog.xml b/com_cgsecure_changelog.xml index 92365aa..1b6973c 100644 --- a/com_cgsecure_changelog.xml +++ b/com_cgsecure_changelog.xml @@ -1,4 +1,16 @@ + + com_cgsecure + package + 3.0.12 + + Update : 13/03/2024 + + + Admin : block simultaneous updates + Recreate button : check activation value + + com_cgsecure package diff --git a/packages/com_cgsecure/admin/cgsecure.xml b/packages/com_cgsecure/admin/cgsecure.xml index 7e90eb0..d7c3611 100644 --- a/packages/com_cgsecure/admin/cgsecure.xml +++ b/packages/com_cgsecure/admin/cgsecure.xml @@ -1,13 +1,13 @@ COM_CGSECURE - 2024-02-12 + 2024-03-13 ConseilGouz pascal.leconte@conseilgouz.com www.conseilgouz.com Copyright (C) 2024 ConseilGouz.com. All Rights Reserved GNU/GPL Version 3 or later - https://www.gnu.org/licenses/gpl-3.0.html - 3.0.9 + 3.0.12 ConseilGouz\Component\CGSecure COM_CGSECURE_XML_DESCRIPTION diff --git a/packages/com_cgsecure/admin/src/View/Config/JsonView.php b/packages/com_cgsecure/admin/src/View/Config/JsonView.php index f2989ca..91c847f 100644 --- a/packages/com_cgsecure/admin/src/View/Config/JsonView.php +++ b/packages/com_cgsecure/admin/src/View/Config/JsonView.php @@ -1,7 +1,7 @@ get('access'); $this->security = $input->get('security'); $msg = ""; + + $wait = self::getServerConfigFilePath('.inprogress'); // create a temp. file to block other requests + if (file_exists($wait)) { + $arr = []; + $arr['retour'] = 'err : already in progress'; + echo new JsonResponse($arr); + return; + } + $msg = 'wait...'; + File::write($wait, $msg); if ($type == 'robots') { if ($access == 0) { // delete CG Secure lines from robots.txt file and delete cg_robots dir $msg = $this->delRobots(); @@ -59,7 +64,7 @@ public function display($tpl = null) } elseif ($type == 'htaccess') { if ($access == 0) { // delete CG Secure lines from htaccess file $msg = $this->delHTAccess(); - $msg = $this->deleteIPSHTAccess(); + $msg .= '
'.$this->deleteIPSHTAccess(); } elseif ($access == 1) {// add CG Secure lines to htaccess file $msg = $this->addHTAccess(); // add .htaccess in images and media directories @@ -68,6 +73,7 @@ public function display($tpl = null) $msg = $this->deleteIPSHTAccess(); } } + File::delete($wait); $arr = []; $arr['retour'] = $msg; echo new JsonResponse($arr); diff --git a/packages/com_cgsecure/cgsecure.xml b/packages/com_cgsecure/cgsecure.xml index 335e554..d7c3611 100644 --- a/packages/com_cgsecure/cgsecure.xml +++ b/packages/com_cgsecure/cgsecure.xml @@ -1,13 +1,13 @@ COM_CGSECURE - 2024-03-11 + 2024-03-13 ConseilGouz pascal.leconte@conseilgouz.com www.conseilgouz.com Copyright (C) 2024 ConseilGouz.com. All Rights Reserved GNU/GPL Version 3 or later - https://www.gnu.org/licenses/gpl-3.0.html - 3.0.11 + 3.0.12 ConseilGouz\Component\CGSecure COM_CGSECURE_XML_DESCRIPTION diff --git a/packages/com_cgsecure/media/js/reload.js b/packages/com_cgsecure/media/js/reload.js index 2d5417b..e4d998c 100644 --- a/packages/com_cgsecure/media/js/reload.js +++ b/packages/com_cgsecure/media/js/reload.js @@ -1,8 +1,8 @@ /** * @component CG Secure - * Version : 2.1.5 - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - * @copyright (C) 2022 ConseilGouz. All Rights Reserved. + * Version : 3.0.12 + * @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL + * @copyright (C) 2024 ConseilGouz. All Rights Reserved. * @author ConseilGouz **/ var timeout; @@ -18,7 +18,9 @@ jQuery(document).ready(function($){ } else { // already exists $security = $('input[id="jform_security"]').val(); } - create_htaccess($,1,$security); // create htaccess + $access = 0; + if ($('input[id="jform_htaccess1"]').hasClass('active')) $access= 1; + create_htaccess($,$access,$security); // create htaccess }) }); function create_htaccess($,access,security) { @@ -27,7 +29,9 @@ function create_htaccess($,access,security) { data: { [token]: "1", task: "display", format: "json",type: "htaccess", access: access, security: security }, success: function(result, status, xhr) { res = result.data.retour; + console.log('res : '+res); $('#cg_result').html(res); + if (res.startsWith('err :')) return; // contains an error : exit Joomla.submitbutton('config.apply'); // force save config. }, error: function(message) {console.log(message.responseText)} diff --git a/packages/library_cgsecure/cgsecure.xml b/packages/library_cgsecure/cgsecure.xml index 8a76e0e..067e22d 100644 --- a/packages/library_cgsecure/cgsecure.xml +++ b/packages/library_cgsecure/cgsecure.xml @@ -3,8 +3,8 @@ CGSecure Library cgsecure ConseilGouz - 3.0.11 - 2024-03-11 + 3.0.12 + 2024-03-13 (C)2024 ConseilGouz. All rights reserved. GNU General Public License version 3 or later; https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL pascal.leconte@conseilgouz.com diff --git a/packages/plg_authentication_cgsecure/cgsecure.xml b/packages/plg_authentication_cgsecure/cgsecure.xml index 0a051cb..6b57657 100644 --- a/packages/plg_authentication_cgsecure/cgsecure.xml +++ b/packages/plg_authentication_cgsecure/cgsecure.xml @@ -2,12 +2,12 @@ PLG_AUTH_COUNTRY ConseilGouz - 2024-03-11 + 2024-03-13 (C)2024 ConseilGouz. All rights reserved. GNU General Public License version 3 or later; see LICENSE.txt pascal.leconte@conseilgouz.com www.conseilgouz.com - 3.0.11 + 3.0.12 PLG_AUTH_COUNTRY_XML_DESCRIPTION cgsecure.php diff --git a/packages/plg_system_cgsecure/cgsecure.xml b/packages/plg_system_cgsecure/cgsecure.xml index a80ec2c..91a418f 100644 --- a/packages/plg_system_cgsecure/cgsecure.xml +++ b/packages/plg_system_cgsecure/cgsecure.xml @@ -2,12 +2,12 @@ System - CG Secure conseilgouz - 2024-03-11 + 2024-03-13 (C)2024 ConseilGouz. All rights reserved. GNU General Public License version 3 or later; see LICENSE.txt pascal.leconte@conseilgouz.com www.conseilgouz.com - 3.0.11 + 3.0.12 CG_SECURE_DESC cgsecure.php diff --git a/packages/plg_user_cgsecure/cgsecure.xml b/packages/plg_user_cgsecure/cgsecure.xml index c2ddd83..4ae82a0 100644 --- a/packages/plg_user_cgsecure/cgsecure.xml +++ b/packages/plg_user_cgsecure/cgsecure.xml @@ -2,12 +2,12 @@ CG_COUNTRY ConseilGouz - 2024-03-11 + 2024-03-13 (C)2024 ConseilGouz. All rights reserved. GNU General Public License version 3 or later; see LICENSE.txt pascal.leconte@conseilgouz.com www.conseilgouz.com - 3.0.11 + 3.0.121 CG_COUNTRY_XML_DESCRIPTION cgsecure.php