From e3267ab9eac2fb7eae1e7896634d9b79e6813197 Mon Sep 17 00:00:00 2001 From: hlshell <35910375+hlshell@users.noreply.github.com> Date: Fri, 15 Nov 2024 06:09:17 +0800 Subject: [PATCH 1/8] Fixing use cloudflare Login show error_message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use cloudflare login show this message:{“errorMessage”: “Session reuse detected, IPAddress logged.”, “error_message”: “Session reuse detected, IPAddress logged.”} The reason is that request.session['ipAddr'] is not paired with security settings. Now the same judgment can solve this problem. --- loginSystem/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/loginSystem/views.py b/loginSystem/views.py index 051adb3b6..73cc48763 100644 --- a/loginSystem/views.py +++ b/loginSystem/views.py @@ -114,13 +114,17 @@ def verifyLogin(request): request.session['userID'] = admin.pk - ipAddr = request.META.get('REMOTE_ADDR') + ipAddr = request.META.get('HTTP_CF_CONNECTING_IP') + if ipAddr is None: + ipAddr = request.META.get('REMOTE_ADDR') if ipAddr.find(':') > -1: ipAddr = ipAddr.split(':')[:3] request.session['ipAddr'] = ''.join(ipAddr) else: - request.session['ipAddr'] = request.META.get('REMOTE_ADDR') + request.session['ipAddr'] = request.META.get('HTTP_CF_CONNECTING_IP') + if request.session['ipAddr'] is None: + request.session['ipAddr'] = request.META.get('REMOTE_ADDR') request.session.set_expiry(43200) data = {'userID': admin.pk, 'loginStatus': 1, 'error_message': "None"} From ed88c546a159a534c81acaa3ad42eaa22a134288 Mon Sep 17 00:00:00 2001 From: hlshell <35910375+hlshell@users.noreply.github.com> Date: Fri, 15 Nov 2024 22:07:26 +0800 Subject: [PATCH 2/8] Update views.py fix --- loginSystem/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loginSystem/views.py b/loginSystem/views.py index 73cc48763..5744ab3da 100644 --- a/loginSystem/views.py +++ b/loginSystem/views.py @@ -120,7 +120,7 @@ def verifyLogin(request): if ipAddr.find(':') > -1: ipAddr = ipAddr.split(':')[:3] - request.session['ipAddr'] = ''.join(ipAddr) + request.session['ipAddr'] = ipAddr else: request.session['ipAddr'] = request.META.get('HTTP_CF_CONNECTING_IP') if request.session['ipAddr'] is None: From a4ab92ae943be765866ee77176430ee1a34a1492 Mon Sep 17 00:00:00 2001 From: hlshell <35910375+hlshell@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:07:05 +0800 Subject: [PATCH 3/8] Update views.py for 2.3.9 i test is sure --- loginSystem/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loginSystem/views.py b/loginSystem/views.py index 5744ab3da..d07e7bcaa 100644 --- a/loginSystem/views.py +++ b/loginSystem/views.py @@ -17,7 +17,7 @@ from django.utils import translation # Create your views here. VERSION = '2.3' -BUILD = 8 +BUILD = 9 def verifyLogin(request): From cd70096343f66b2a19438f9d483747a0fbddc783 Mon Sep 17 00:00:00 2001 From: Master3395 Date: Sun, 26 Jan 2025 20:39:08 +0100 Subject: [PATCH 4/8] Update README.md Updating the dates on EOL. Adding better emojis. --- README.md | 217 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 159 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index d75047b79..4f17b4ddd 100755 --- a/README.md +++ b/README.md @@ -1,75 +1,176 @@ -# CyberPanel +# 🛠️ CyberPanel -Web Hosting Control Panel that uses OpenLiteSpeed as the underlying Web Server. +Web Hosting Control Panel powered by OpenLiteSpeed, designed to simplify hosting management. -## Features & Services +--- -* Different User Access Levels (via ACLs). -* Auto SSL. -* FTP Server. -* Light-weight DNS Server (PowerDNS). -* phpMyAdmin will manage DBs (MariaDB). -* Email Support (SnappyMail). -* File Manager. -* PHP Management. -* Firewall (FirewallD & ConfigServer Firewall Integration). -* One-click Backups and Restores. +## 🔧 Features & Services -# Supported PHP Versions +- 🔐 **Different User Access Levels** (via ACLs). +- 🌌 **Auto SSL** for secure websites. +- 💻 **FTP Server** for file transfers. +- 🕒 **Light-weight DNS Server** (PowerDNS). +- 🔐 **phpMyAdmin** to manage databases (MariaDB). +- 📧 **Email Support** (SnappyMail). +- 🕌 **File Manager** for quick file access. +- 🌐 **PHP Management** made easy. +- 🔒 **Firewall** (✅ FirewallD & ConfigServer Firewall Integration). +- 📀 **One-click Backups and Restores**. -* PHP 8.3 (will reach end of life (EOL) on 31 Dec, 2027.) -* PHP 8.2 (will reach end of life (EOL) on 31 Dec, 2026.) -* PHP 8.1 (will reach end of life (EOL) on 31 Dec, 2025.) -* PHP 8.0 (will reach end of life (EOL) on 26 Nov, 2023.) -* PHP 7.4 (Ubuntu 22.04 and Almalinux 9.x and up does not support php below this version.) (will reach end of life (EOL) on 28 Nov 2022.) -* PHP 7.3 (will reach end of life (EOL) on 6 Dec, 2021.) -* PHP 7.2 (will reach end of life (EOL) on 30 Nov, 2020.) -* PHP 7.1 (Almalinux 8.x and up does not support php below this version.),(will reach end of life (EOL) on 1 Dec, 2019.) -* PHP 7.0 (will reach end of life (EOL) on 10 Jan, 2019.) -* PHP 5.6 (will reach end of life (EOL) on 31 Dec, 2018.) -* PHP 5.5 (will reach end of life (EOL) on 21 Jul, 2016.) -* PHP 5.4 (will reach end of life (EOL) on 3 Sep, 2015.) -* PHP 5.3 (will reach end of life (EOL) on 14 Aug, 2014.) +--- -# Supported OS Versions +## 🔢 Supported PHP Versions -* CyberPanel is supported on x86_64 based -* Ubuntu 18.04 (will reach end of life (EOL) on 31 May, 2023.) -* Ubuntu 20.04 (will reach end of life (EOL) on April, 2025.) -* Ubuntu 20.10 (will reach end of life (EOL) on 22 July, 2021.) -* Ubuntu 22.04 (will reach end of life (EOL) on Apr 2022 - Apr 2027.) -* CentOS 7 (will reach end of life (EOL) on 30 June, 2024.) -* CentOS 8 (will reach end of life (EOL) on 31 December, 2021.) -* CentOS 9 (will reach end of life (EOL) on 31 May, 2027.) -* RHEL 8 (will reach end of life (EOL) on 31 May, 2029.) -* RHEL 9 (will reach end of life (EOL) on 31 May, 2032.) -* AlmaLinux 8 (will reach end of life (EOL) on 01 May, 2024).) -* AlmaLinux 9 (will reach end of life (EOL) on 31 May, 2027.) -* RockyLinux 8 (will reach end of life (EOL) on 31 May, 2029.) -* CloudLinux 7 (will reach end of life (EOL) on 01 July, 2024.) -* CloudLinux 8 (will reach end of life (EOL) on 31 May, 2029.) -* openEuler 20.03 (will reach end of life (EOL) on April, 2022.) -* openEuler 22.03 (will reach end of life (EOL) on March, 2024.) +CyberPanel supports PHP versions based on your operating system: -# Installation Instructions +### ☑️ **PHP 8.0 and Above** +- Fully supported on modern systems such as Ubuntu 22.04 and AlmaLinux 9.x and higher. -``` +### ☑️ **PHP 7.4 and Below** +- Compatible with AlmaLinux 8, Ubuntu 18.04, and similar environments. + +### Adding PHP Versions as Third-Party Add-ons + +Some PHP versions can be added to operating systems as third-party packages using external repositories or tools. Here's an overview by OS: + +#### **Ubuntu**: +- **Ubuntu 22.04**: + - Highest: PHP 8.5 (default repository or Ondrej's PPA). + - Lowest: PHP 7.4 (via Ondrej's PPA). +- **Ubuntu 20.04**: + - Highest: PHP 8.5 (default repository or Ondrej's PPA). + - Lowest: PHP 7.0 (via Ondrej's PPA). +- **Ubuntu 18.04**: + - Highest: PHP 8.4 (via Ondrej's PPA). + - Lowest: PHP 5.6 (via Ondrej's PPA). + +#### **AlmaLinux**: +- **AlmaLinux 9**: + - Highest: PHP 8.5 (default repository or Remi repository). + - Lowest: PHP 7.4 (via Remi repository). +- **AlmaLinux 8**: + - Highest: PHP 8.4 (default repository or Remi repository). + - Lowest: PHP 5.6 (via Remi repository). + +#### **CentOS**: +- **CentOS 9**: + - Highest: PHP 8.4 (via Remi repository). + - Lowest: PHP 7.4 (via Remi repository). +- **CentOS 8**: + - Highest: PHP 8.4 (via Remi repository). + - Lowest: PHP 5.6 (via Remi repository). +- **CentOS 7**: + - Highest: PHP 8.0 (via Remi repository). + - Lowest: PHP 5.4 (via Remi repository). + +#### **RHEL**: +- **RHEL 9**: + - Highest: PHP 8.4 (via Remi repository). + - Lowest: PHP 7.4 (via Remi repository). +- **RHEL 8**: + - Highest: PHP 8.4 (via Remi repository). + - Lowest: PHP 5.6 (via Remi repository). + +#### **RockyLinux**: +- **RockyLinux 8**: + - Highest: PHP 8.5 (via Remi repository). + - Lowest: PHP 5.6 (via Remi repository). + +#### **CloudLinux**: +- **CloudLinux 8**: + - Highest: PHP 8.5 (via Remi repository). + - Lowest: PHP 5.6 (via Remi repository). +- **CloudLinux 7**: + - Highest: PHP 8.0 (via Remi repository). + - Lowest: PHP 5.4 (via Remi repository). + +#### **openEuler**: +- **openEuler 22.03**: + - Highest: PHP 8.4 (default repository). + - Lowest: PHP 7.4 (default repository). +- **openEuler 20.03**: + - Highest: PHP 7.3 (default repository). + - Lowest: PHP 7.0 (default repository). + +### Full List of PHP Versions and End of Life (EOL) Dates: +- ✨ **PHP 8.5** - EOL: 31 Dec 2028. +- ✨ **PHP 8.4** - EOL: 31 Dec 2027. +- ✨ **PHP 8.3** - EOL: 31 Dec 2027. +- ✨ **PHP 8.2** - EOL: 31 Dec 2026. +- ✨ **PHP 8.1** - EOL: 31 Dec 2025. +- 🛑 **PHP 8.0** - EOL: 26 Nov 2023. +- 🛑 **PHP 7.4** - EOL: 28 Nov 2022. +- 🛑 **PHP 7.3** - EOL: 6 Dec 2021. +- 🛑 **PHP 7.2** - EOL: 30 Nov 2020. +- 🛑 **PHP 7.1** - EOL: 1 Dec 2019. +- 🛑 **PHP 7.0** - EOL: 10 Jan 2019. +- 🛑 **PHP 5.6** - EOL: 31 Dec 2018. +- 🛑 **PHP 5.5** - EOL: 21 Jul 2016. +- 🛑 **PHP 5.4** - EOL: 3 Sep 2015. +- 🛑 **PHP 5.3** - EOL: 14 Aug 2014. + +--- + +## 🌐 Supported OS Versions + +CyberPanel runs on x86_64 architecture and supports the following operating systems: + +### **Ubuntu**: +- Ubuntu 22.04 ✅ Supported until April 2027. +- Ubuntu 20.04 ✅ Supported until April 2025. +- Ubuntu 18.04 🛑 EOL: 31 May 2023. + +### **CentOS**: +- CentOS 9 ✅ EOL: 31 May 2027. +- CentOS 8 🛑 EOL: 31 Dec 2021. +- CentOS 7 🛑 EOL: 30 June 2024. + +### **RHEL**: +- RHEL 9 ✅ EOL: 31 May 2032. +- RHEL 8 ✅ EOL: 31 May 2029. + +### **AlmaLinux**: +- AlmaLinux 9 ✅ EOL: 31 May 2027. +- AlmaLinux 8 🛑 EOL: 1 May 2024. + +### **Other OS**: +- RockyLinux 8 ✅ EOL: 31 May 2029. +- CloudLinux 8 ✅ EOL: 31 May 2029. +- CloudLinux 7 🛑 EOL: 1 Jul 2024. +- openEuler 22.03 🛑 EOL: March 2024. +- openEuler 20.03 🛑 EOL: April 2022. + +--- + +## ⚙️ Installation Instructions + +Install CyberPanel easily with the following command: + +```bash sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh) ``` -# Upgrading CyberPanel +--- -``` +## 📊 Upgrading CyberPanel + +Upgrade your CyberPanel installation using: + +```bash sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh) ``` -# Resources +--- -* [Official Site.](https://cyberpanel.net) -* [Docs (Old).](https://docs.cyberpanel.net) -* [Docs (New).](https://community.cyberpanel.net/docs) -* [Changelog.](https://community.cyberpanel.net/t/change-logs/161) -* [Forums.](https://community.cyberpanel.net) -* [Discord.](https://discord.gg/g8k8Db3) -* [Facebook Group.](https://www.facebook.com/groups/cyberpanel) -* [YouTube Channel.](https://www.youtube.com/@Cyber-Panel) +## 📚 Resources + +- 🌐 [Official Site](https://cyberpanel.net) +- ✏️ [Docs (Old)](https://docs.cyberpanel.net) +- 🎓 [Docs (New)](https://community.cyberpanel.net/docs) +- ✅ [Changelog](https://community.cyberpanel.net/t/change-logs/161) +- 💬 [Forums](https://community.cyberpanel.net) +- 📢 [Discord](https://discord.gg/g8k8Db3) +- 📵 [Facebook Group](https://www.facebook.com/groups/cyberpanel) +- 🎥 [YouTube Channel](https://www.youtube.com/@Cyber-Panel) + +--- \ No newline at end of file From a2dd43b97bc1750e2e10ee9581bc0c8d13a80137 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 7 Mar 2025 15:37:36 +0500 Subject: [PATCH 5/8] bug fix: template load of email limits --- mailServer/mailserverManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailServer/mailserverManager.py b/mailServer/mailserverManager.py index dc9e99f76..4673eb066 100755 --- a/mailServer/mailserverManager.py +++ b/mailServer/mailserverManager.py @@ -1813,9 +1813,9 @@ milter_default_action = accept else: return redirect("https://cyberpanel.net/cyberpanel-addons") else: - template = 'baseTemplate/EmailLimits.html' + template = 'mailServer/EmailLimits.html' except BaseException as msg: - template = 'baseTemplate/EmailLimits.html' + template = 'mailServer/EmailLimits.html' proc = httpProc(self.request, template, From 48649804c0c6504b47ca12e376e835a83343095f Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 7 Mar 2025 18:52:09 +0500 Subject: [PATCH 6/8] bug fix: template load of email limits --- plogical/upgrade.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 70a762b57..f3cf4e83f 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -892,7 +892,11 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; cursor.execute("UPDATE loginSystem_acl SET config = '%s' where name = 'admin'" % (Upgrade.AdminACL)) except BaseException as msg: print(str(msg)) - import sleep + try: + import sleep + except: + from time import sleep + from time import sleep sleep(10) try: From a82f75d6ca0447b5528a2322c9f85c59426c808e Mon Sep 17 00:00:00 2001 From: usmannasir Date: Tue, 18 Mar 2025 17:23:29 +0500 Subject: [PATCH 7/8] update cloudlinux link --- CLManager/templates/CLManager/notAvailable.html | 2 +- firewall/templates/firewall/notAvailable.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CLManager/templates/CLManager/notAvailable.html b/CLManager/templates/CLManager/notAvailable.html index 1c5bcbd0a..5d4a2a22f 100755 --- a/CLManager/templates/CLManager/notAvailable.html +++ b/CLManager/templates/CLManager/notAvailable.html @@ -20,7 +20,7 @@

{% trans "CloudLinux is not installed on your server." %} Click + href="https://community.cyberpanel.net/t/1-convert-cyberpanel-to-cloudlinux-os-and-install-cagefs/174">Click Here {% trans " for conversion details." %}

diff --git a/firewall/templates/firewall/notAvailable.html b/firewall/templates/firewall/notAvailable.html index 498b0eb0a..fee8d3104 100755 --- a/firewall/templates/firewall/notAvailable.html +++ b/firewall/templates/firewall/notAvailable.html @@ -24,7 +24,7 @@

{% trans "CloudLinux is not installed on your server." %} Click + href="https://community.cyberpanel.net/t/1-convert-cyberpanel-to-cloudlinux-os-and-install-cagefs/174">Click Here {% trans " for conversion details." %}

From a63894df692d78c5a6c74346c46521b5b1f6cb31 Mon Sep 17 00:00:00 2001 From: Morteza Saeed Mohammadi Date: Wed, 19 Mar 2025 11:34:36 +0100 Subject: [PATCH 8/8] Fix: Resolve #1332 by detecting AlmaLinux or Rocky Linux and enabling CRB repo correctly --- cyberpanel.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 769e27132..7509a1b4c 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -849,7 +849,17 @@ if [[ $Server_OS = "CentOS" ]] ; then dnf install libxcrypt-compat -y fi - subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms || yum config-manager --set-enabled crb > /dev/null 2>&1 + # check if OS is AlmaLinux + if grep -q -E "AlmaLinux|Rocky Linux" /etc/os-release ; then + # check and install dnf-plugins-core if not installed + rpm -q dnf-plugins-core > /dev/null 2>&1 || dnf install -y dnf-plugins-core + # enable codeready-builder repo for AlmaLinux + dnf config-manager --set-enabled crb > /dev/null 2>&1 + else + # enable codeready-builder repo for Other RHEL Based OS + subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms > /dev/null 2>&1 + fi + yum install -y https://cyberpanel.sh/dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm Check_Return "yum repo" "no_exit" yum install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm