Skip to content

Commit 05ae9fe

Browse files
authored
Merge pull request #1684 from master3395/v2.5.5-dev
V2.5.5 dev
2 parents 9dc93ad + 4177f00 commit 05ae9fe

File tree

37 files changed

+3343
-663
lines changed

37 files changed

+3343
-663
lines changed

.DS_Store

-12 KB
Binary file not shown.

CPScripts/mailscannerinstaller.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
5555
Server_OS="CloudLinux"
5656
elif grep -q -E "Rocky Linux" /etc/os-release ; then
5757
Server_OS="RockyLinux"
58-
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10|Ubuntu 22.04" /etc/os-release ; then
58+
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10|Ubuntu 22.04|Ubuntu 24.04" /etc/os-release ; then
5959
Server_OS="Ubuntu"
6060
elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then
6161
Server_OS="openEuler"
6262
else
6363
echo -e "Unable to detect your system..."
64-
echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
64+
echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, Ubuntu 24.04, CentOS 7, CentOS 8, AlmaLinux 8, AlmaLinux 9, AlmaLinux 10, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
6565
exit
6666
fi
6767

CPScripts/mailscanneruninstaller.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
1212
Server_OS="CloudLinux"
1313
elif grep -q -E "Rocky Linux" /etc/os-release ; then
1414
Server_OS="RockyLinux"
15-
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10|Ubuntu 22.04" /etc/os-release ; then
15+
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10|Ubuntu 22.04|Ubuntu 24.04" /etc/os-release ; then
1616
Server_OS="Ubuntu"
1717
elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then
1818
Server_OS="openEuler"
1919
else
2020
echo -e "Unable to detect your system..."
21-
echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
21+
echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, Ubuntu 24.04, CentOS 7, CentOS 8, AlmaLinux 8, AlmaLinux 9, AlmaLinux 10, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
2222
exit
2323
fi
2424

CyberCP/secMiddleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def __call__(self, request):
267267

268268
response['X-XSS-Protection'] = "1; mode=block"
269269
response['X-Frame-Options'] = "sameorigin"
270-
response['Content-Security-Policy'] = "script-src 'self' https://www.jsdelivr.com"
270+
response['Content-Security-Policy'] = "script-src 'self' 'unsafe-inline' https://www.jsdelivr.com"
271271
response['Content-Security-Policy'] = "connect-src *;"
272272
response['Content-Security-Policy'] = "font-src 'self' 'unsafe-inline' https://www.jsdelivr.com https://fonts.googleapis.com"
273273
response[

CyberCP/settings.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
import os
1414
from django.utils.translation import gettext_lazy as _
1515

16-
# Patreon OAuth Configuration for Paid Plugins
17-
# SECURITY: Environment variables take precedence. Hardcoded values are fallback for this server only.
18-
# For repository version, use empty defaults and set via environment variables.
19-
PATREON_CLIENT_ID = os.environ.get('PATREON_CLIENT_ID', 'LFXeXUcfrM8MeVbUcmGbB7BgeJ9RzZi2v_H9wL4d9vG6t1dV4SUnQ4ibn9IYzvt7')
20-
PATREON_CLIENT_SECRET = os.environ.get('PATREON_CLIENT_SECRET', 'APuJ5qoL3TLFmNnGDVkgl-qr3sCzp2CQsKfslBbp32hhnhlD0y6-ZcSCkb_FaUJv')
16+
# Patreon OAuth (optional): for paid-plugin verification via Patreon membership.
17+
# Set these only if you use Patreon-gated plugins; leave unset otherwise.
18+
# Use environment variables; no defaults so the repo stays generic and safe to push to GitHub.
19+
PATREON_CLIENT_ID = os.environ.get('PATREON_CLIENT_ID', '')
20+
PATREON_CLIENT_SECRET = os.environ.get('PATREON_CLIENT_SECRET', '')
2121
PATREON_CREATOR_ID = os.environ.get('PATREON_CREATOR_ID', '')
22-
PATREON_MEMBERSHIP_TIER_ID = os.environ.get('PATREON_MEMBERSHIP_TIER_ID', '27789984') # CyberPanel Paid Plugin tier
23-
PATREON_CREATOR_ACCESS_TOKEN = os.environ.get('PATREON_CREATOR_ACCESS_TOKEN', 'niAHRiI9SgrRCMmaf5exoXXphy3RWXWsX4kO5Yv9SQI')
24-
PATREON_CREATOR_REFRESH_TOKEN = os.environ.get('PATREON_CREATOR_REFRESH_TOKEN', 'VZlCQoPwJUr4NLni1N82-K_CpJHTAOYUOCx2PujdjQg')
22+
PATREON_MEMBERSHIP_TIER_ID = os.environ.get('PATREON_MEMBERSHIP_TIER_ID', '')
23+
PATREON_CREATOR_ACCESS_TOKEN = os.environ.get('PATREON_CREATOR_ACCESS_TOKEN', '')
24+
PATREON_CREATOR_REFRESH_TOKEN = os.environ.get('PATREON_CREATOR_REFRESH_TOKEN', '')
2525

2626
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
2727
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -37,6 +37,22 @@
3737

3838
ALLOWED_HOSTS = ['*']
3939

40+
# When the panel is behind a reverse proxy (e.g. https://panel.example.com -> http://backend:port),
41+
# the browser sends Origin/Referer with the public domain while the proxy may send Host as the
42+
# backend address. Django then fails CSRF (Referer vs Host mismatch) and POSTs get 403.
43+
# Set CSRF_TRUSTED_ORIGINS to your public origin(s) so CSRF passes. Optional; leave unset if
44+
# you access the panel by IP:port only.
45+
# Example: export CSRF_TRUSTED_ORIGINS="https://panel.example.com,http://panel.example.com"
46+
_csrf_origins_env = os.environ.get('CSRF_TRUSTED_ORIGINS', '')
47+
_csrf_origins_list = [o.strip() for o in _csrf_origins_env.split(',') if o.strip()]
48+
# Add default trusted origins for common CyberPanel domains
49+
_default_origins = [
50+
'https://cyberpanel.newstargeted.com',
51+
'http://cyberpanel.newstargeted.com',
52+
]
53+
# Merge environment and default origins, avoiding duplicates
54+
CSRF_TRUSTED_ORIGINS = list(dict.fromkeys(_csrf_origins_list + _default_origins))
55+
4056
# Application definition
4157

4258
INSTALLED_APPS = [

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,25 @@ Fast • Secure • Scalable — Simplify hosting management with style.
7070

7171
| OS family | Recommended / Supported |
7272
| -------------------------- | ----------------------: |
73-
| Ubuntu 24.04, 22.04, 20.04 | ✅ Recommended |
73+
| AlmaLinux 10, 9, 8 | ✅ Recommended |
74+
| CentOS 7 | ⚠️ Legacy — EOL |
75+
| CloudLinux 9, 8 | ✅ Supported |
7476
| Debian 13, 12, 11 | ✅ Supported |
75-
| AlmaLinux 10, 9, 8 | ✅ Supported |
76-
| RockyLinux 9, 8 | ✅ Supported |
7777
| RHEL 9, 8 | ✅ Supported |
78-
| CloudLinux 9, 8 | ✅ Supported |
79-
| CentOS 7 | ⚠️ Legacy — EOL |
78+
| RockyLinux 9, 8 | ✅ Supported |
79+
| Ubuntu 24.04, 22.04, 20.04 | ✅ Recommended |
8080

81-
> CyberPanel targets x86\_64 only. Test the unsupported OS in staging first.
81+
> **Architectures:** x86_64 (primary), aarch64/ARM64 (supported). AlmaLinux is the recommended RHEL-compatible distribution. Test unsupported OS in staging first.
8282
8383
---
8484

8585
## PHP support (short)
8686

87-
***Recommended**: PHP 8.5 (beta), 8.4, 8.3, 8.2, 8.1
88-
* ⚠️ **Legacy**: PHP 8.0, PHP 7.4 (security-only)
89-
***Deprecated**: PHP 7.1, 7.2, 7.3 (no longer installed)
87+
***Recommended**: PHP 8.5, 8.4
88+
* ⚠️ **Security fixes only**: PHP 8.3, 8.2, 8.1
89+
***EOL / Deprecated**: PHP 8.0, 7.4, 7.1, 7.2, 7.3 (no longer supported)
9090

91-
Third-party repositories (Remi, Ondrej) may provide older or niche versions; verify compatibility before use.
91+
Third-party repositories may provide older or niche versions; verify compatibility before use. RHEL/Alma/Rocky: [Remi RPM](https://rpms.remirepo.net/). Ubuntu/Debian: [Ondrej PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php). See [php.net/supported-versions](https://www.php.net/supported-versions.php).
9292

9393
---
9494

0 commit comments

Comments
 (0)