Skip to content

Commit

Permalink
2.2.7
Browse files Browse the repository at this point in the history
Cleanup installation script
  • Loading branch information
conseilgouz committed Mar 28, 2023
1 parent 0913a4f commit f4c2bf7
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
12 changes: 12 additions & 0 deletions com_cgsecure_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<changelogs>
<changelog>
<element>com_cgsecure</element>
<type>package</type>
<version>2.2.7</version>
<note>
<item>Update : 28/03/2023</item>
</note>
<fix>
<item>Cleanup installation script</item>
</fix>
</changelog>
<changelog>
<element>com_cgsecure</element>
<type>package</type>
Expand All @@ -8,6 +19,7 @@
</note>
<fix>
<item>Invalid version in cgaccess file</item>
<item>Normalize version numbers in component/plugins/library</item>
</fix>
</changelog>
<changelog>
Expand Down
7 changes: 2 additions & 5 deletions packages/com_cgsecure/admin/cgsecure.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4.0" method="upgrade">
<name>COM_CGSECURE</name>
<creationDate>2023-03-27</creationDate>
<creationDate>2023-03-28</creationDate>
<author>ConseilGouz</author>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<copyright>Copyright (C) 2023 ConseilGouz.com. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.2.3</version>
<version>2.2.7</version>
<namespace path="src">ConseilGouz\Component\CGSecure</namespace>
<description>COM_CGSECURE_XML_DESCRIPTION</description>
<scriptfile>script.php</scriptfile>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql
Expand All @@ -35,11 +34,9 @@
<menu link="option=com_cgsecure&amp;view=logs" view="logs">COM_CGSECURE_LOGS</menu>
</submenu>
<files folder="admin">
<filename>index.html</filename>
<filename>cgsecure.xml</filename>
<filename>access.xml</filename>
<filename>config.xml</filename>
<filename>script.php</filename>
<folder>sql</folder>
<folder>forms</folder>
<folder>services</folder>
Expand Down
2 changes: 1 addition & 1 deletion packages/com_cgsecure/cgsecure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>www.conseilgouz.com</authorUrl>
<copyright>Copyright (C) 2023 ConseilGouz.com. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.2.6</version>
<version>2.2.7</version>
<namespace path="src">ConseilGouz\Component\CGSecure</namespace>
<description>COM_CGSECURE_XML_DESCRIPTION</description>
<install>
Expand Down
2 changes: 1 addition & 1 deletion packages/com_cgsecure/media/txt/cgaccess.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#------------------------CG SECURE HTACCESS BEGIN-2.2.6--------------------
#------------------------CG SECURE HTACCESS BEGIN-2.2.7--------------------
# CG Secure blocks and reports hacking attempts
# from https://docs.joomla.org/Htaccess_examples_(security) , https://perishablepress.com/7g-firewall/ and AESecure.
#
Expand Down
2 changes: 1 addition & 1 deletion packages/library_cgsecure/cgsecure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>CGSecure Library</name>
<libraryname>cgsecure</libraryname>
<author>ConseilGouz</author>
<version>2.2.6</version>
<version>2.2.7</version>
<creationDate>2023-03-28</creationDate>
<copyright>(C)2023 ConseilGouz. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
2 changes: 1 addition & 1 deletion packages/plg_authentication_cgsecure/cgsecure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.2.6</version>
<version>2.2.7</version>
<description>PLG_AUTH_COUNTRY_XML_DESCRIPTION</description>
<files>
<filename plugin="cgsecure">cgsecure.php</filename>
Expand Down
4 changes: 2 additions & 2 deletions packages/plg_system_cgsecure/cgsecure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension type="plugin" group="system" method="upgrade" version="4.0">
<name>System - CG Secure</name>
<author>conseilgouz</author>
<creationDate>2022 August</creationDate>
<creationDate>2023/03/28</creationDate>
<copyright>This plugin is released under the GNU/GPL License</copyright>
<license>GNU General Public License</license>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.1.7</version>
<version>2.2.7</version>
<description>CG_SECURE_DESC</description>
<files>
<filename plugin="cgsecure">cgsecure.php</filename>
Expand Down
9 changes: 3 additions & 6 deletions script.install.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PlgSystemCgsecureInstallerInstallerScript
private $previous_version = '';
private $dir = null;
private $installerName = 'cgsecureinstaller';
private $cgsecure_force_update_version = "2.2.6";
private $cgsecure_force_update_version = "2.2.7";
const SERVER_CONFIG_FILE_HTACCESS = '.htaccess';
const SERVER_CONFIG_FILE_NONE = '';
const CGPATH = '/media/com_cgsecure';
Expand Down Expand Up @@ -148,10 +148,6 @@ private function postInstall() {
}
// Begin update HTACCESS -----------------------------------------------
private function forceHTAccess() {
// get security code from table
$helperFile = JPATH_SITE . '/libraries/cgsecure/ipcheck.php';
if (!class_exists('CGIpCheckHelper') && is_file($helperFile)) include_once $helperFile;
$cgsecure_params = CGIpCheckHelper::getParams();
$this->security = $cgsecure_params->security; // htaccess has been created => security must contain a value
$serverConfigFile = $this->getServerConfigFile(self::SERVER_CONFIG_FILE_HTACCESS);
if (!$serverConfigFile) { // no .htaccess file : copy default htaccess.txt as .htaccess
Expand Down Expand Up @@ -236,7 +232,8 @@ private function read_current($afile) {
}
private function read_cgfile($afile) {
$readBuffer = file($afile, FILE_IGNORE_NEW_LINES);
$this->config = $this->getParams();
$this->config = $this->getParams();
$this->security = $this->config->security;
if ($this->config->multi == '1') {// site multi-adresse
$server = '('.str_replace(',','|',$this->config->get('multisite','')).')';
$dir = "";
Expand Down

0 comments on commit f4c2bf7

Please sign in to comment.