Skip to content

Commit

Permalink
Major Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Reker committed Nov 13, 2020
1 parent 7a96ad8 commit a4afb97
Show file tree
Hide file tree
Showing 234 changed files with 8,368 additions and 26,820 deletions.
42 changes: 42 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
End-User License Agreement (EULA) of Security Lite

This End-User License Agreement ("EULA") is a legal agreement between you and Mathias Reker.

This EULA agreement governs your acquisition and use of our Security Lite software ("Software") directly from Mathias Reker or indirectly through a Mathias Reker authorized reseller or distributor (a "Reseller").

Please read this EULA agreement carefully before completing the installation process and using the Security Lite software. It provides a license to use the Security Lite software and contains warranty information and liability disclaimers.

If you are entering into this EULA agreement on behalf of a company or other legal entity, you represent that you have the authority to bind such entity and its affiliates to these terms and conditions. If you do not have such authority or if you do not agree with the terms and conditions of this EULA agreement, do not install or use the Software, and you must not accept this EULA agreement.

This EULA agreement shall apply only to the Software supplied by Mathias Reker herewith regardless of whether other software is referred to or described herein. The terms also apply to any Mathias Reker updates, supplements, Internet-based services, and support services for the Software, unless other terms accompany those items on delivery. If so, those terms apply.

This Software is provided by Mathias Reker "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall Mathias Reker be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

License Grant

The Software you bought is sold with a single license, you can use it on one website only. You can install it on a test shop, but this must be the URL of the final website and in accordance with the terms of this EULA agreement.

You are permitted to install the Security Lite software on a server under your control. You are responsible for ensuring your server meets the minimum requirements of the Security Lite software.

You are not permitted to:

Reproduce, copy, distribute, resell or otherwise use the Software for any commercial purpose
Allow any third party to use the Software on behalf of or for the benefit of any third party
Use the Software in any way which breaches any applicable local, national or internationallaw
use the Software for any purpose that Mathias Reker considers is a breach of this EULA agreement.

Intellectual Property and Ownership

Mathias Reker shall at all times retain ownership of the Software as originally downloaded by you and all subsequent downloads of the Software by you. The Software (and the copyright, and other intellectual property rights of whatever nature in the Software, including any modifications made thereto) are and shall remain the property of Mathias Reker.

Mathias Reker reserves the right to grant licenses to use the Software to third parties.

Termination

This EULA agreement is effective from the date you first use the Software and shall continue until terminated. You may terminate it at any time upon written notice to Mathias Reker.

It will also terminate immediately if you fail to comply with any term of this EULA agreement. Upon such termination, the licenses granted by this EULA agreement will immediately terminate and you agree to stop all access and use of the Software. The provisions that by their nature continue and survive will survive any termination of this EULA agreement.

Governing Law

This EULA agreement, and any dispute arising out of or in connection with this EULA agreement, shall be governed by and construed in accordance with the laws of Denmark.
25 changes: 0 additions & 25 deletions backup/database/index.php

This file was deleted.

25 changes: 0 additions & 25 deletions backup/files/index.php

This file was deleted.

25 changes: 0 additions & 25 deletions backup/index.php

This file was deleted.

37 changes: 0 additions & 37 deletions backupdb-cron.php

This file was deleted.

25 changes: 0 additions & 25 deletions composer.json

This file was deleted.

21 changes: 11 additions & 10 deletions controllers/admin/AdminSecurityLiteController.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<?php
/**
* 2020 Mathias R.
* This file is part of the securitypro package.
*
* NOTICE OF LICENSE
* @author Mathias Reker
* @copyright Mathias Reker
* @license Commercial Software License
*
* This file is licensed under the Software License Agreement
* With the purchase or the installation of the software in your application
* you accept the license agreement.
*
* @author Mathias R.
* @copyright Mathias R.
* @license Commercial license (You can not resell or redistribute this software.)
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

if (!\defined('_PS_VERSION_')) {
exit;
}

class AdminSecurityLiteController extends ModuleAdminController
{
public function __construct()
{
parent::__construct();

\Tools::redirectAdmin(\Context::getContext()->link->getAdminLink('AdminModules', true) . '&configure=securitylite');
return \Tools::redirectAdmin(\Context::getContext()->link->getAdminLink('AdminModules', true) . '&configure=securitylite&tab_reset=1');
}
}
15 changes: 6 additions & 9 deletions controllers/admin/index.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<?php
/**
* 2020 Mathias R.
* This file is part of the securitypro package.
*
* NOTICE OF LICENSE
* @author Mathias Reker
* @copyright Mathias Reker
* @license Commercial Software License
*
* This file is licensed under the Software License Agreement
* With the purchase or the installation of the software in your application
* you accept the license agreement.
*
* @author Mathias R.
* @copyright Mathias R.
* @license Commercial license (You can not resell or redistribute this software.)
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

\header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
Expand Down
104 changes: 104 additions & 0 deletions controllers/front/cron.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php
/**
* This file is part of the securitylite package.
*
* @author Mathias Reker
* @copyright Mathias Reker
* @license Commercial Software License
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

if (!\defined('_PS_VERSION_')) {
exit;
}

class SecurityLiteCronModuleFrontController extends ModuleFrontController
{
/** @var bool */
public $ajax;

/**
* Display content
*/
public function display()
{
@\ini_set('memory_limit', '1024M');
@\set_time_limit(3600);
@\ignore_user_abort(true);

if (true === (bool) Configuration::get('PRO_DEBUG_CRON')) {
@\ini_set('display_errors', 1);
@\ini_set('display_startup_errors', 1);
@\error_reporting(\E_ALL);
}

$this->ajax = 1;

// Check token
if (!Tools::isPHPCLI()) {
if ($this->module->encrypt('securitylite/cron') !== Tools::getValue('token') || !Module::isInstalled('securitylite')) {
$response = $this->module->l('Forbidden call.', 'cron');
$this->getResponse($response);
}
}

// Try to run cronjob
try {
$response = $this->runCronjob();
} catch (Exception $e) {
if (true === (bool) Configuration::get('PRO_DEBUG_CRON')) {
$response = $e;
} else {
$response = $this->module->l('Something went wrong.', 'cron');
}
} finally {
$this->getResponse($response);
}
}

/**
* Write to log and display response
*
* @param string $response
*/
private function getResponse($response)
{
$name = Tools::getValue('name');

$this->module->logCron($name, $response);

$this->ajaxDie($response);
}

/**
* Run cronjob
*
* @return string
*/
private function runCronjob()
{
// Check if module is activated
if (true === (bool) $this->module->active) {
$this->module->cron = 1;

// Run the cronjob
$name = Tools::getValue('name');
switch ($name) {
case 'DeleteOldCarts':
$this->module->deleteOldCarts();
break;
case 'BackupDatabase':
$this->module->backupDatabase();
break;
default:
return $this->module->l('Cronjob does not exist.', 'cron');
}
} else {
return $this->module->l('securitylite is not active.', 'cron');
}

return $this->module->l('Success!', 'cron');
}
}
22 changes: 22 additions & 0 deletions controllers/front/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* This file is part of the securitypro package.
*
* @author Mathias Reker
* @copyright Mathias Reker
* @license Commercial Software License
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

\header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
\header('Last-Modified: ' . \gmdate('D, d M Y H:i:s') . ' GMT');

\header('Cache-Control: no-store, no-cache, must-revalidate');
\header('Cache-Control: post-check=0, pre-check=0', false);
\header('Pragma: no-cache');

\header('Location: ../');

exit;
Loading

0 comments on commit a4afb97

Please sign in to comment.