From 2065f41699558b04bef6f75acbecd4ae7b89db10 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 27 Jun 2025 00:31:47 +0500 Subject: [PATCH] bug fix: make sure free scan works --- CLScript/CLMain.py | 2 +- CyberCP/settings.py | 1 + aiScanner/aiScannerManager.py | 1 + baseTemplate/context_processors.py | 10 +++++++ .../templates/baseTemplate/index.html | 28 +++++++++---------- baseTemplate/views.py | 2 +- install/install.py | 2 +- loginSystem/views.py | 2 +- plogical/adminPass.py | 2 +- plogical/backupUtilities.py | 2 +- plogical/upgrade.py | 2 +- serverStatus/views.py | 2 +- 12 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 baseTemplate/context_processors.py diff --git a/CLScript/CLMain.py b/CLScript/CLMain.py index 1f7bf1943..11f313817 100644 --- a/CLScript/CLMain.py +++ b/CLScript/CLMain.py @@ -5,7 +5,7 @@ class CLMain(): self.path = '/usr/local/CyberCP/version.txt' #versionInfo = json.loads(open(self.path, 'r').read()) self.version = '2.4' - self.build = '1' + self.build = '2' ipFile = "/etc/cyberpanel/machineIP" f = open(ipFile) diff --git a/CyberCP/settings.py b/CyberCP/settings.py index c3fbf104d..0226e657c 100644 --- a/CyberCP/settings.py +++ b/CyberCP/settings.py @@ -95,6 +95,7 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'baseTemplate.context_processors.version_context', ], }, }, diff --git a/aiScanner/aiScannerManager.py b/aiScanner/aiScannerManager.py index f762bdd94..b9b425a7a 100644 --- a/aiScanner/aiScannerManager.py +++ b/aiScanner/aiScannerManager.py @@ -712,6 +712,7 @@ class AIScannerManager: """Submit scan request to AI Scanner API""" try: payload = { + 'domain': domain, 'site_url': domain, 'scan_type': scan_type, 'cyberpanel_callback': callback_url, diff --git a/baseTemplate/context_processors.py b/baseTemplate/context_processors.py new file mode 100644 index 000000000..c63e23902 --- /dev/null +++ b/baseTemplate/context_processors.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +from .views import VERSION, BUILD + +def version_context(request): + """Add version information to all templates""" + return { + 'CYBERPANEL_VERSION': VERSION, + 'CYBERPANEL_BUILD': BUILD, + 'CYBERPANEL_FULL_VERSION': f"{VERSION}.{BUILD}" + } \ No newline at end of file diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index ce3ca6876..b55a32d92 100644 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -1656,20 +1656,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + +