Commit Graph

5806 Commits

Author SHA1 Message Date
Master3395
a2ee765134 Merge pull request #1754 from master3395/v2.5.5-dev
V2.5.5 dev
2026-04-07 18:55:21 +02:00
master3395
facd84fec2 DNS: stop auto-creating duplicate DMARC TXT records
CyberPanel previously added _dmarc at the apex (p=none) in two code paths and _dmarc on every child subdomain, which conflicts with a single externally managed policy (e.g. Cloudflare) and violates RFC 7489 (one TXT RRset per name). Comment out automatic DMARC creation so operators set one record at _dmarc.<apex> only.
2026-04-07 18:50:16 +02:00
master3395
3308233959 Fix OLS+Apache child domains: DNS CF sync, ACME paths, subdomain creation UX
- dnsUtilities: correct createDNSRecordCloudFlare argument order (priority, ttl)
- vhostConfs/ApacheVhosts: OLSLBConf uses real docRoot and acme-challenge path for child vhosts (vhRoot is parent domain)
- virtualHostUtilities: defer ChildDomains save until after SSL/Apache; cleanup ORM row on failure; createDomain CLI exits 0/1 with 1,/0, stdout
- websiteFunctions: submitDomainCreation waits on subprocess and returns failure JSON on error
2026-04-06 01:48:35 +02:00
master3395
9c08cfe94f fix(dns): delete all Cloudflare DNS records for child subdomains
When removing a child domain, matching only the apex label (e.g. vscode)
left mail.* and www.* (and MX/TXT/DMARC) records in the parent zone.
Normalize record names to FQDN under the zone and delete the subdomain
FQDN plus any names under it.
2026-04-06 00:57:12 +02:00
Master3395
425d31f539 Merge pull request #1753 from master3395/v2.5.5-dev
V2.5.5 dev
2026-04-05 15:57:09 +02:00
Master3395
8666cf7d71 Fix typo in 'Please wait...' message 2026-04-05 15:56:12 +02:00
master3395
b8dcb66b6b fix(ssl): deploy renewed certs to /etc/letsencrypt/live (#1676)
- After acme.sh renew/issue, run install-cert into live/ (ECC/RSA aware)
- Resolve ACME webroot from sslpath like obtainSSLForADomain
- Add --ecc to obtainSSL acme.sh install-cert (PR #1732 alignment)
- Add test/ssl_acme_helpers_test.py smoke tests for webroot helpers
2026-04-03 21:37:37 +02:00
Master3395
1f4c43aa92 Merge pull request #1751 from master3395/v2.5.5-dev
V2.5.5 dev
2026-04-03 21:26:13 +02:00
master3395
c705b7e6c8 manageServices: align version cache TTL and application page meta
Raise default CYBERCP_MANAGED_APPS version cache TTL to 3600s to match
Manage Applications inventory behavior and reduce cold DNF fetches.
Refresh application_page_meta and synced manageServices static assets.
2026-04-03 21:21:21 +02:00
master3395
975966146f Docker Manager: fix container update flow and UI sync
Align updateContainer with the panel (name vs containerName), pull new
images before removing the old container, and sync the Containers model
after a successful update. getContainerList now shows live Config.Image
so tags match Docker. Add notification-center progress for updates,
guard overlapping requests, and return new_image on success.
2026-04-03 21:20:32 +02:00
master3395
dbd6379bcb Manage Services: RabbitMQ 4.x default, repo alignment, UI fixes
- Detect RHEL major from /etc/os-release and align Packagecloud RabbitMQ .repo URLs.
- Improve version discovery (el8 metadata merge on EL9+, 4.x fallback when DNF omits builds).
- Default RabbitMQ stream to 4.x in API, page bootstrap, serviceManager, and normalize_rabbitmq_stream.
- UI: prefetch 4.x on install, stream buttons 4.x first, fix confirm checkbox ng-model parent scope.
- Bump msModal cache-bust for manageServices.js.
2026-04-01 03:27:17 +02:00
master3395
eb31b66871 Manage Applications: Elasticsearch, Redis, RabbitMQ installers and UI hardening
Add modular application packages with backup-aware install/upgrade/downgrade,
DNF-backed version lists with TTL caching, and HTML bootstrap for faster loads.
Improve the version picker (labels, selection state, background meta refresh) and
route applicationMeta through shared page meta cache. Update static assets and
cache buster for manageServices.js. Repository also includes related updates to
serviceManager, upgrade tooling, website functions, and user management from this
development tree.
2026-04-01 00:35:22 +02:00
master3395
f2c02c7501 Use official RabbitMQ logo as local static asset.
Switch Manage Applications RabbitMQ icon to a bundled official SVG path to avoid broken icon rendering while keeping assets local.
2026-03-31 20:49:11 +02:00
master3395
5da16e0940 Fix RabbitMQ application icon SVG compatibility.
Replace the original SVG markup with a simpler standards-compliant variant so the icon renders reliably in Manage Applications.
2026-03-31 20:42:07 +02:00
master3395
95e38e70f3 Add RabbitMQ support to Manage Applications and lifecycle flows.
Wire RabbitMQ into app management UI/actions, optional fresh-install flag handling, and upgrade-safe marker/service reconciliation so new installs and upgrades can expose it reliably.
2026-03-31 20:41:00 +02:00
master3395
2c1b6ad557 Plugin UI: Premium filter, URL hash sync; installer DB SQL fallback; loginSystem migrations.
- plugins.html: Premium show filter, #grid?show=&sort=&cat=&q= hash restore, cache 28.03.2026-v3.
- pluginInstaller + plogical/pluginMigrationSQL: migrate fallback via sqlmigrate/mariadb and DROP cleanup on remove.
- loginSystem: initial migration (SeparateDatabaseAndState) for graph compatibility.
- README: Updated 28.03.2026.
2026-03-28 01:21:37 +01:00
master3395
ffde367671 plugins: place settings back-link inside #main-content
Avoid full-width bar over sidebar; rounded card-style bar; fallback after <body>
if template has no main-content.
2026-03-27 23:59:00 +01:00
master3395
4f42e7d2d7 plugins: back link to Installed on all proxied settings pages
Inject bar after <body> in plugin_settings_proxy HTML responses; skip streaming
and non-HTML; idempotent if bar already present; translatable label.
2026-03-27 23:54:41 +01:00
Master3395
b7c2f0a43f Merge pull request #1748 from master3395/v2.5.5-dev
V2.5.5 dev
2026-03-27 23:51:17 +01:00
master3395
7098a7e4f2 plugins: delete local source after uninstall (with confirmations)
- POST /plugins/api/delete-source/<name>/ removes copies under plugin source paths only
- Require safe plugin id, block if still installed under CyberCP; symlink-aware paths
- Clear state file, informCyberPanelRemoval, invalidate store cache
- UI: Delete local copy in grid/table/store; two-step confirm; amber button style
- Enrich store JSON with has_local_source and builtin
2026-03-27 23:49:36 +01:00
master3395
c8c1bc5f1f plugins: reliable lscpd restart after install and revert
- restartGunicorn: try systemctl as root; else sudo -n then systemctl; log failures
- revert_plugin: call restartGunicorn after successful backup restore
2026-03-27 23:39:11 +01:00
Master3395
c7c0507229 Merge pull request #1747 from master3395/v2.5.5-dev
V2.5.5 dev
2026-03-27 23:10:37 +01:00
master3395
7b3bf85964 upgrade sync: force match origin when checkout blocked; fail script if sync fails
- 09_sync: stash -u + reset --hard; quarantine untracked paths; verify HEAD==origin/branch
- Remove subshell/tee that hid git failures; set /etc/cyberpanel/last_git_sync_failed on error
- cyberpanel_upgrade: exit 1 after final display if git sync failed
- 11_display_final: show warning banner when CYBERPANEL_GIT_SYNC_OK!=1
2026-03-27 23:02:32 +01:00
master3395
c128e76e20 upgrade: fail fast if CyberCP clone fails; retry clone; quarantine old tree
- Honor downloadAndUpgrade return value; exit 1 instead of printing Upgrade Completed
- Restart lscpd if code update fails so panel is reachable on old tree
- CYBERPANEL_UPGRADE_CLONE_ATTEMPTS (default 2) for transient clone errors
- On rmtree failure, move /usr/local/CyberCP aside instead of aborting when possible
- Export CYBERPANEL_UPGRADE_CLONE_ATTEMPTS from 08_main_upgrade.sh
2026-03-27 22:47:09 +01:00
master3395
751dd6d6e0 Version Management: show fork + upstream tips; upstream-only when origin is official
- Parse git origin; show fork block only when not usmannasir/cyberpanel
- Always fetch official upstream branch tip; fetch fork tip when fork
- Notecheck: fork installs vs fork tip; official vs upstream tip
- Template: tracking branch, optional fork rows, drift info; clarify warning
2026-03-27 22:35:16 +01:00
master3395
c950fbc4ab feat(versionManagment): fork vs official upstream rows and layout refresh
- views: remote_display, branch_ref, fork_remote_commit, upstream_commit,
  short SHAs, GitHub commit URLs, notecheck_compare_remote, local_behind_official
- template: installation grid, full-width meta rows, i18n upgrade note,
  info notice when local differs from official upstream on dev
2026-03-27 22:08:45 +01:00
master3395
227608aaa3 fix(versionManagment): compare dev fork installs to fork branch on GitHub
Official usmannasir/cyberpanel origin still uses upstream v2.5.5-dev tip;
forks now resolve latest commit from origin owner/repo so local HEAD can
match Latest Commit without false upgrade notices.
2026-03-27 21:58:48 +01:00
master3395
2c1f8f8933 fix: LPMA launch routes in secMiddleware; strict sign-on + lpma_policy_read
- secMiddleware: allow Limited phpMyAdmin launch URLs and phpmyadminsignin
  without JSON-body filtering that breaks sign-on POSTs
- plogical/public phpmyadminsignin: lpma_policy_read.inc.php, strict cookie helpers
- webmail: section header comments only
2026-03-27 21:54:17 +01:00
master3395
cbcf4e62e4 feat(baseTemplate): plugin sidebar context; LPMA link for grant-only users
- plugin_sidebar_context: show_plugins_menu, Limited phpMyAdmin for cpuser grants
- index.html: conditional Installed/Store vs grant-only LPMA submenu
2026-03-27 21:48:25 +01:00
master3395
515ba2ae33 feat(firewall): merge Auto Ban Security Alerts logs into banned IPs API
- getBannedIPs: append AutoBanLog rows (latest per IP) not already in DB/JSON
- Skip expired timed bans; tag rows with ban_source autoBanSecurityAlerts
- removeBannedIP/deleteBannedIP: handle synthetic id ablog-<pk> via unban by IP
2026-03-27 21:48:25 +01:00
Master3395
d57dcdbf7d Merge pull request #1746 from master3395/v2.5.5-dev
V2.5.5 dev
2026-03-27 21:14:23 +01:00
master3395
98c086d7af fix(pluginHolder): reliable plugin upgrades, store UI dates, upgrades columns
- Harden meta.xml sync (cache-bust, no CDN downgrade); ZIP meta fallback; fail if version stuck
- Invalidate plugin store cache after successful upgrade
- Add modify_timestamp for browser-local DD.MM.yyyy / 24h display via toLocaleString
- Upgrades table: Your Version column before New Version; freshness uses timestamp when present
2026-03-27 21:08:40 +01:00
master3395
65f6b7af64 fix phpmyadmin signin endpoint not found
Restore the missing phpMyAdmin sign-in bridge file so CyberPanel DB login no longer returns 404 on /phpmyadmin/phpmyadminsignin.php.
2026-03-27 13:40:49 +01:00
master3395
80ea96cc91 fix: ensure phpMyAdmin signin bridge + auto plugin migrations + PMA tmp dir
- Add plogical/phpmyadmin_utils.ensure_phpmyadmin_signin_bridge: restore
  phpmyadminsignin.php and tmp/ if missing (fixes 404 on /phpmyadmin/phpmyadminsignin.php).
- Call from databases phpMyAdmin page, fetchDetailsPHPMYAdmin, install, and upgrade PMA paths.
- install/upgrade: use makedirs(..., exist_ok=True) for phpmyadmin/tmp instead of mkdir.
- pluginInstaller: run migrate when migrations/ contains modules OR enable_migrations;
  use CyberCP venv python; --noinput for migrate; log non-zero exits.
2026-03-27 01:15:33 +01:00
master3395
2b23826948 fix(pluginHolder): resolve CyberPanel admin identity for activation APIs
Use session userID -> Administrator email for subscription checks, activation persistence, and paid-plugin access when Django auth user is not populated.
2026-03-26 23:16:45 +01:00
master3395
8d3e2cd51a pluginHolder: fix plugin store stale-cache refresh + hourly scheduler
Remove stuck plugin-store refresh locks, show correct cache status in UI, and add a management command for hourly refresh.
2026-03-26 22:45:54 +01:00
master3395
b5b313090a pluginHolder: fix plugin store cache timestamp display and stale refresh trigger.
Render next cache update in Norwegian format and mark overdue cache clearly while triggering background refresh from Installed view when cache metadata is expired.
2026-03-26 15:22:56 +01:00
master3395
a8d1c0f4e9 pluginHolder: auto-persist activation keys from plugin settings pages.
Inject a lightweight fetch hook into settings pages to call store-activation after successful plugin activation responses, reducing premium relock risk after upgrades.
2026-03-26 15:09:03 +01:00
master3395
ff93f0facb pluginHolder: persist premium activation keys in MariaDB.
Store plugin activation entitlements in DB and use them in access checks so upgrades do not relock premium plugins.
2026-03-26 12:39:48 +01:00
master3395
c50b51dfbf install: port origin/v2.4.5 lscpd el9/10 selection, start retry, venv lscpd restart (e49ed16f)
- Use lscpd.0.4.0 on Alma 9/10 and RHEL-family VERSION_ID 9/10
- daemon-reload + retry systemctl start lscpd in setupLSCPDDaemon
- 04_after_install: _restart_lscpd_safe + libxcrypt-compat on EL10 prereqs
2026-03-26 01:36:55 +01:00
master3395
e71fe07952 install.sh: fetch cyberpanel.sh from repo so AlmaLinux 10 fixes are used 2026-03-26 01:35:06 +01:00
Infinyte Solutions
421f085d26 Refactor: replace url() with path() for Django routes
Update URL generation to use path() instead of url(),
aligning with Django 4.x where url() is deprecated.
2026-03-26 01:26:39 +01:00
usmannasir
50eef93271 Add ModSecurity compatibility detection for user installations
Handle the scenario where users install ModSecurity after CyberPanel is already
installed with custom OpenLiteSpeed binaries.

Problem:
- When users click "Install ModSecurity" in CyberPanel UI, the system used
  package manager (yum/apt) to install stock ModSecurity
- Stock ModSecurity is NOT ABI-compatible with custom OLS binaries
- This causes immediate server crashes (segfaults) when installed

Solution:
- Detect if custom OLS binary is already installed before installing ModSecurity
- If custom OLS detected, download compatible ModSecurity from cyberpanel.net
- If stock OLS detected, use package manager as usual

Implementation:
- isCustomOLSBinaryInstalled(): Detects custom OLS by scanning binary for markers
- detectBinarySuffix(): Determines Ubuntu vs RHEL binaries needed
- installCompatibleModSecurity(): Downloads, verifies, and installs compatible ModSecurity
- Modified installModSec(): Main entry point - routes to compatible installer if needed

User flow:
1. User with custom OLS clicks "Install ModSecurity" in UI
2. System detects custom OLS binary is installed
3. System writes "Detected custom OpenLiteSpeed binary" to install log
4. System downloads OS-specific compatible ModSecurity from cyberpanel.net
5. System verifies SHA256 checksum
6. System backs up any existing ModSecurity
7. System installs compatible version with OLS restart
8. User sees "ModSecurity Installed (ABI-compatible version).[200]"

Safety features:
- Checksum verification before installation
- Automatic backup of existing ModSecurity
- Graceful OLS restart with timeout handling
- Detailed logging to /home/cyberpanel/modSecInstallLog

This prevents server crashes when users install ModSecurity after custom OLS
binaries are already deployed.
2026-03-26 01:25:21 +01:00
usmannasir
a835413b63 Fix n8n proxy configuration for OpenLiteSpeed compatibility
- Change N8N_HOST to 0.0.0.0 (internal bind address, not domain)
- Simplify VHost extraHeaders to ONLY set Origin header
- Remove duplicate X-Forwarded-* headers (OLS adds these automatically)
- Remove N8N_ALLOWED_ORIGINS and N8N_ALLOW_CONNECTIONS_FROM (not needed)

The key issue was duplicate X-Forwarded-Host headers. OpenLiteSpeed proxy
contexts automatically add X-Forwarded-* headers, so explicitly setting
them creates duplicates that cause n8n validation to fail.

Only the Origin header needs explicit configuration in extraHeaders.
This works with the patched OLS binary (MD5: b9c65aa2563778975d0d2361494e9d31)
that forwards Origin headers from the client.
2026-03-26 01:25:16 +01:00
usmannasir
63110a4605 Update n8n deployment to use latest version
- Changed from pinned version 1.86.1 to latest
- Requires OpenLiteSpeed binaries with Origin header forwarding support
- Compatible with n8n 1.87.0+ which has strict Origin validation

Note: This requires the OpenLiteSpeed binary that includes the Origin
header forwarding patch in the proxy module. The patch is available
in the CyberPanel OpenLiteSpeed distribution.
2026-03-26 01:24:45 +01:00
usmannasir
e09804f25a Fix n8n deployment compatibility with OpenLiteSpeed proxy
- Pin n8n to version 1.86.1 to avoid Origin header validation issues
- Change N8N_HOST from 0.0.0.0 to domain for better compatibility
- Add N8N_PROXY_HOPS=1 to fix X-Forwarded-For errors
- Add N8N_ALLOWED_ORIGINS and N8N_ALLOW_CONNECTIONS_FROM for future compatibility
- Fix SetupN8NVhost to remove malformed Origin header setting

n8n versions 1.87.0+ introduced strict Origin header validation that is
incompatible with OpenLiteSpeed proxy (which doesn't forward Origin headers).
Version 1.86.1 works correctly with OLS and SSE push backend.
2026-03-26 01:24:45 +01:00
master3395
0610e07a4a Fix AlmaLinux 8 installation: Add python-dotenv to requirements
- Install python-dotenv in virtual environment during CyberPanel setup
- Fixes Django's inability to load .env file on AlmaLinux 8
- Resolves "Access denied for user 'cyberpanel'@'localhost'" errors
- Added to all installation paths (normal, DEV, and after_install)

This ensures Django can properly load database credentials from .env file
on AlmaLinux 8 systems where python-dotenv was missing.
2026-03-26 01:24:35 +01:00
Master3395
35b705aaad Enhance OS detection and support for additional distributions
- Updated OS detection logic to include CentOS Stream and Red Hat Enterprise Linux.
- Added support for AlmaLinux 9 and 10, as well as Debian 11, 12, and 13.
- Improved error messages to reflect the expanded list of supported operating systems.
- Adjusted package management handling for Debian to treat it as Ubuntu for compatibility.
2026-03-26 01:23:03 +01:00
master3395
12475461a1 fix(install): strip MaxScale apt repo in universal_os_fixes (Ubuntu/Debian) 2026-03-26 01:06:26 +01:00
master3395
9627770c99 fix(install): Ubuntu MaxScale apt repo (#1740), AlmaLinux 10 prereqs (#1736)
- Add install_utils.strip_mariadb_maxscale_apt_repos() after mariadb_repo_setup
  so noble/jammy apt-get update succeeds (GH usmannasir/cyberpanel#1740).
- AlmaLinux 10: skip early return after universal fixes; add is_almalinux10,
  fix_almalinux10_mariadb (EPEL, CRB, MariaDB.org repo, maxscale disable).
- EL10 maps to rhel9 for OLS custom binary URLs until el10 builds exist.
- Mirror MaxScale strip in install.py _attemptMariaDBUpgrade Ubuntu path.
2026-03-26 01:04:48 +01:00