Fixed: Warning triggered when subscription controller is accessed without a token

Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
shazar rahman
2026-09-01 12:58:06 +05:30
parent 5c52b86487
commit cd7370a335
2 changed files with 85 additions and 0 deletions

View File

@@ -665,6 +665,11 @@ class FrontControllerCore extends Controller
public function initCursedPage()
{
$this->displayMaintenancePage();
header('HTTP/1.1 403 Forbidden');
$this->context->smarty->assign($this->initLogoAndFavicon());
$front_controller = preg_match('/ModuleFrontController$/', get_class($this)) ? new FrontController() : $this;
$this->layout = $front_controller->getTemplatePath($this->getThemeDir().'access-denied.tpl');
}
/**

View File

@@ -0,0 +1,80 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<!DOCTYPE html>
<html lang="{$language_code|escape:'html':'UTF-8'}">
<head>
<meta charset="utf-8">
<title>{$meta_title|escape:'html':'UTF-8'}</title>
<meta name="robots" content="noindex,nofollow">
<link rel="shortcut icon" href="{$favicon_url}">
<style>
html {
padding: 30px 10px;
font-size: 16px;
line-height: 1.4;
color: #737373;
background: #f0f0f0;
}
html, input {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body {
max-width: 480px;
padding: 0 0 50px;
border: 1px solid #b3b3b3;
border-radius: 4px;
margin: 0 auto;
box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
background-color: #e0e0e0;
text-align: center;
}
.logo-band {
background-color: #e0e0e0;
padding: 20px;
}
img.logo {
max-height: 60px;
}
h2 {
color: #D35780;
margin: 1em 0 0.5em;
font-size: 28px;
}
p {
margin: 1em 20px;
}
</style>
</head>
<body>
<div class="logo-band">
<img class="logo" src="{$logo_url}" alt="logo" />
</div>
<h2>{l s='Access denied'}</h2>
<p>{l s='You do not have permission to access this page.'}</p>
</body>
</html>