Commit Graph

5778 Commits

Author SHA1 Message Date
usmannasir
aa5fec13b9 Fix webmail account switcher and improve error handling
- Fix apiSSO() resetting selected account to first one on every call,
  now preserves previously selected account if still valid
- Fix webmail.conf ownership to use cyberpanel:cyberpanel (Django runs
  as cyberpanel user, not nobody)
- Add error notifications when SSO or folder loading fails
2026-03-05 05:01:45 +05:00
usmannasir
71cf034c8a Automate Dovecot master user setup for webmail SSO in install and upgrade
Adds master passdb config to dovecot.conf templates, setupWebmail() to
the installer and upgrade paths to generate credentials and create
/etc/dovecot/master-users and /etc/cyberpanel/webmail.conf automatically.
The upgrade path is idempotent and patches existing dovecot.conf if needed.
2026-03-05 03:39:00 +05:00
usmannasir
ed615e25fe Fix webmail to match CyberPanel Dovecot/Postfix configuration
- Use correct Dovecot namespace (separator='.', prefix='INBOX.'):
  folders are INBOX.Sent, INBOX.Drafts, INBOX.Deleted Items, etc.
- Quote IMAP folder names with spaces (e.g. "INBOX.Deleted Items")
- Add display_name and folder_type to folder list API response
- Fix SMTP for SSO: use local relay on port 25 (permit_mynetworks)
  since Dovecot has no auth_master_user_separator for port 587
- Fix Sieve SASL PLAIN auth to use clean RFC 4616 format
- Handle ManageSieve unavailability gracefully with helpful logging
- Update frontend to show clean folder names and correct icons
- Auto-prefix new folder names with INBOX. namespace
2026-03-05 03:08:07 +05:00
usmannasir
3637f481c9 Add integrated webmail client with SSO, contacts, and Sieve rules
Replace SnappyMail link with a custom Django webmail app that provides:
- Full IMAP/SMTP integration (Dovecot + Postfix) with master user SSO
- 3-column responsive UI matching CyberPanel design system
- Compose with rich text editor, attachments, reply/forward
- Contact management with auto-collect from sent messages
- Sieve mail filter rules with ManageSieve protocol support
- Standalone login page for direct webmail access
- Account switcher for admins managing multiple email accounts
- HTML email sanitization (whitelist-based, external image proxy)
- Draft auto-save and per-user settings
2026-03-05 02:49:00 +05:00
usmannasir
8f544375f8 Update cyberpanel_ols module hashes for SIGSEGV crash fix
Rebuilt module fixes NULL pointer dereference in apply_headers() when
OLS generates error responses (4xx/5xx). The get_req_var_by_id() call
for DOC_ROOT crashed because request variables aren't initialized
during error response generation. Fix adds status code guard to skip
header processing for error responses.
2026-03-04 16:46:21 +05:00
Master3395
9c261eab98 Merge pull request #1682 from master3395/v2.4.4
V2.4.4
2026-02-26 21:10:42 +01:00
Master3395
38321ff224 Merge pull request #1714 from master3395/v2.5.5-dev
V2.5.5 dev
2026-02-26 21:10:27 +01:00
master3395
ac723d1f2c fix(webterminal): use SSH port from sshd_config for custom SSH port (fixes #1713)
- Add get_ssh_port() to read Port from /etc/ssh/sshd_config
- Use 127.0.0.1 and port=SSH_PORT in asyncssh.connect()
- Web Terminal now works when SSH runs on non-22 port
2026-02-26 21:00:10 +01:00
master3395
542616dfb5 Fix vhost config Save button visibility on child domain page
Add fallback gradient and !important color for btn-primary when
--bg-gradient is undefined (e.g. dark mode/base theme), so the Save
button is always visible instead of appearing white/invisible.
2026-02-22 01:33:27 +01:00
master3395
25b6d9d1aa Cloudflare: auto-enable proxy except mail-related subdomains
Expand mail-domain detection so proxy stays off for:
mail., smtp., imap., pop3., pop., autodiscover., webmail.
(and subdomains containing these). Other A/AAAA/CNAME get proxied by default.
2026-02-22 01:19:36 +01:00
master3395
31eed7f919 Fix createNONSSLMapEntry: propagate real errors, case-insensitive listener match, detect missing Default block
- Return (success, error_msg) from createNONSSLMapEntry instead of 0/1
- Fix logging: use CyberCPLogFileWriter.writeToFile instead of writeToFile
- Match listener block case-insensitively (listener Default / listener default)
- Raise clear ValueError if Default listener block not found in httpd_config.conf
- Propagate actual error messages in createConfigInMainVirtualHostFile and createConfigInMainDomainHostFile
2026-02-22 01:13:45 +01:00
master3395
7c1efa6d38 Apply stashes: README upgrade docs, .gitignore, dockerManager, pluginHolder URLs
- README: upgrade to v2.5.5-dev, master3395 URLs, preUpgrade/loader docs
- .gitignore: patreon_secrets.env, patreon_config.py
- dockerManager: keep listContainersPage (upstream), resolve JS conflict
- pluginHolder: add check-subscription and plugin_help routes (merge both)
2026-02-17 13:40:03 +01:00
master3395
7565dd4969 Install/upgrade and CPScripts: preserve all local changes
- cyberpanel_install_monolithic.sh, cyberpanel_upgrade_monolithic.sh
- install/ (install.py, venvsetup), install_modules/02_install_core.sh
- plogical/upgrade.py
- upgrade_modules/03_mariadb.sh, 05_repository.sh
- CPScripts: phpmyadmin_version_changer.sh, snappymail_version_changer.sh
- to-do/ (MARIADB-ROLLBACK-FROM-BACKUP.md)
2026-02-17 13:37:20 +01:00
master3395
9c615f8c5e Fix DNS + settings: CNAME skip in fixDNS, DB password from file
- dnsManager.fixDNSRecordsCloudFlare: track existing_types_by_name;
  skip adding A/AAAA when hostname has CNAME (A/AAAA cannot coexist
  with CNAME). Clearer docstring.
- dnsUtilities: comment tweak for proxy-capable record types.
- settings.py: read DB password from /etc/cyberpanel/mysqlPassword
  when present so panel stays in sync with CLI/install scripts.
2026-02-17 02:20:12 +01:00
master3395
edbaf9f39d Cloudflare DNS: allow AAAA proxying + harden addDeleteDNSRecordsCloudFlare
- dnsManager.py: include AAAA in record types that get proxied flag on
  update (was only A, CNAME); fix HTTP 500 by hardening loadCFKeys and
  addDeleteDNSRecordsCloudFlare (safe file read, always pass
  domainsList/cfEmail/cfToken to template).
- dnsUtilities.py: A, AAAA and CNAME can be proxied in Cloudflare;
  set proxied only for those types; MX, TXT, etc. cannot be proxied.
2026-02-17 02:16:22 +01:00
master3395
ad3b4c3e2d Fix GetServerIPv6(): parse IPv6 with ipaddress, exclude only loopback/link-local
- Bug: filtering on '::1' in line incorrectly excluded addresses like
  2a02:c206:2238:7806::1, so fixDNS() never created AAAA records.
- Fix: use ipaddress.ip_address() and is_loopback/is_link_local so
  only actual loopback (::1) and link-local (fe80::) are excluded.
- GetServerIPv6() now returns correct global IPv6 for DNS AAAA records.
2026-02-17 02:15:17 +01:00
master3395
19f5dd402f Fix DNS: add A/AAAA for all panel domains and subdomains (no duplicates) 2026-02-17 01:50:00 +01:00
master3395
8a5b5f9e59 DNS CloudFlare: delete confirmation, clear all, restore, export/import, orphan check
- Delete record: confirmation dialog and local backup before delete
- Clear all DNS records: double confirmation (zone name), local backup, Restore button
- Export/Import DNS records (JSON) for zone
- Check orphan DNS: find A/AAAA/CNAME for hostnames no longer in panel, remove with backup
- Backend: getExportRecordsCloudFlare, clearAllDNSRecordsCloudFlare, importDNSRecordsCloudFlare, getStaleDNSRecordsCloudFlare, removeStaleDNSRecordsCloudFlare
2026-02-17 01:43:01 +01:00
master3395
68ec7184eb Remove to-do folder 2026-02-17 01:01:34 +01:00
master3395
a3d511bef6 v2.5.5-dev: phpMyAdmin CSRF exempt, login error handling, phpMyAdmin install script
- urls.py: serve_phpmyadmin with @csrf_exempt for sign-in POST
- loginSystem/views.py: loadLoginPage error handling; friendly 503 on DB access denied
- csrfMiddleware.py: optional path-based CSRF exempt for /phpmyadmin/, /snappymail/
- fix-phpmyadmin-install.sh: install/fix phpMyAdmin under public/phpmyadmin (signin + config)
2026-02-17 00:57:19 +01:00
master3395
dc8de9a951 Add deploy script for Docker containers fix to live panel 2026-02-17 00:43:11 +01:00
master3395
70939a4cd8 Fix HTTP 500 on /docker/containers: add error handling and auto-migrate 2026-02-17 00:39:48 +01:00
master3395
5ef12676f1 Upgrade: run upgrade.py from correct cwd; add install/upgrade audit doc 2026-02-17 00:36:41 +01:00
Master3395
75d3dca9fc Merge pull request #1708 from master3395/v2.5.5-dev
V2.5.5 dev
2026-02-17 00:27:58 +01:00
master3395
410c4ffbc0 Fix emailMarketing reverse error + dashboardStatsController ctrlreg
- CyberCP/urls.py: when emailMarketing app is missing/broken, register placeholder path with name='emailMarketing' so {% url 'emailMarketing' %} never raises Reverse not found.
- public/static/baseTemplate/custom-js/system-status.js: replace old copy with full system-status.js that registers dashboardStatsController and systemStatusInfo (fixes Angular [:ctrlreg] and raw {{$ cpuUsage $}} on overview).
2026-02-17 00:27:15 +01:00
master3395
3ba4005a4e Install/upgrade: ensure MariaDB client no-SSL in all modules and monolithic (ERROR 2026 fix) 2026-02-17 00:07:09 +01:00
master3395
d38436a04f Upgrade: resolve conflict, default CYBERPANEL_GIT_USER to master3395 2026-02-17 00:03:03 +01:00
master3395
e526e9a208 MariaDB: ensure client no-SSL (ssl=0, skip-ssl) on all installs - fix ERROR 2026 2026-02-17 00:00:28 +01:00
KraoESPfan1n
92cdc16dcb Merge origin/v2.5.5-dev: Plugin Store sidebar, ?view=store, master3395 default, clone comment 2026-02-16 23:51:13 +01:00
master3395
59955cf444 Sidebar: add Plugin Store link under Plugins submenu 2026-02-16 23:48:09 +01:00
master3395
e68dd8d022 Sidebar: add Plugin Store link; upgrade: MariaDB 12.3 path, master3395 clone
- baseTemplate: add 'Plugin Store' to Plugins submenu (links to ?view=store)
- pluginHolder/plugins.html: respect URL param view=store on load
- cyberpanel_upgrade.sh: proper MariaDB major-version upgrade (stop, remove, install, start, mariadb-upgrade); use CYBERPANEL_GIT_USER only (remove server-specific path)
- plogical/upgrade.py: clone URL from CYBERPANEL_GIT_USER for fork
2026-02-16 23:47:49 +01:00
master3395
3b2759989e Fix v2.5.5-dev upgrader: master3395 repo, branch/args parsing, CYBERPANEL_GIT_USER
- Fix 1: Parse -b/--branch and --mariadb-version with while-loop so only next token is used
  (avoids Branch_Name becoming 'v2.5.5-dev --mariadb-version 12.3')
- Fix 2: Default Git_User to master3395 in Pre_Upgrade_Setup_Git_URL (04_git_url, monolithic)
- Fix 3: upgrade.py uses CYBERPANEL_GIT_USER for git clone (default master3395);
  export CYBERPANEL_GIT_USER before upgrade.py in 08_main_upgrade and monolithic
- Fix 4: --mariadb-version already supported in 05_repository.sh (MARIADB_VER_REPO)
2026-02-16 20:28:48 +01:00
Master3395
ace4b8b0a6 Merge pull request #1706 from master3395/v2.5.5-dev
Ban IP: close connections when already banned; install conntrack-tool…
2026-02-16 19:56:28 +01:00
master3395
810ab0d86f Ban IP: close connections when already banned; install conntrack-tools on all OS
- firewallUtilities: add closeConnectionsFromIP() using conntrack -D -s IP
- addBannedIP: when IP already banned, close connections and return success message
- Frontend: always call API on Ban IP so backend can close connections; show server message
- Install: add conntrack-tools (RHEL) / conntrack (Debian/Ubuntu) to all install paths
  (rhel_deps, debian_deps, install_modules/01_verify_deps, install.py, venvsetup)
2026-02-16 19:54:37 +01:00
Master3395
90abef3c9e Merge pull request #1705 from master3395/v2.5.5-dev
V2.5.5 dev
2026-02-16 19:27:02 +01:00
master3395
4e59c816e2 Add Select2 vendor assets (baseTemplate and static) 2026-02-16 19:25:54 +01:00
master3395
176d56cc32 MySQL Manager: fix status/processes load, Query Info 'No query', MariaDB-safe parsing, deploy docs
- databases.js: app ref for ctrlreg, cache-buster, error handling, public/static sync
- mysqlUtilities: column-name process list (MariaDB), SHOW GLOBAL STATUS safe parse, Query Info 'No query'
- mysqlmanager.html: Query Info fallback for NULL
- Deploy docs: DEPLOY-BEFORE-PUSH, DEPLOY-MYSQL-MANAGER-TO-SERVER (public/static)
- Other: CyberPanelUpgrade, upgrade, websiteFunctions, userManagment, website
2026-02-16 19:24:39 +01:00
master3395
5980298ca5 MySQL Manager: fix empty status/processes, error messages, deploy-safe 2026-02-16 18:27:22 +01:00
master3395
ae6289ef9c DNS: cache-bust dns.js (DNS_STATIC_VERSION), no-cache headers on CloudFlare page 2026-02-16 18:09:58 +01:00
master3395
08472ae012 CloudFlare DNS: search via controller filteredRecords + $watch (no filter pipe) 2026-02-16 18:06:13 +01:00
master3395
05db20865d CloudFlare DNS: fix search (dnsSearch.filter scope binding) 2026-02-16 18:02:27 +01:00
master3395
1a4b896784 CloudFlare DNS: mobile-friendly layout, enableProxy 500 fix, search filter 2026-02-16 15:29:09 +01:00
master3395
f592e1552e CloudFlare DNS: fix search (custom filter), search icon left of box 2026-02-16 15:14:00 +01:00
master3395
c403bfb0c8 CloudFlare DNS: sortable columns, search bar (filter all records) 2026-02-16 15:08:40 +01:00
master3395
80f0f29512 CloudFlare DNS: TTL dropdown use ng-value so AUTO shows correctly 2026-02-16 14:58:18 +01:00
master3395
e2c8f5a5ab CloudFlare DNS: inline edit (no modify button), Type dropdown fix, deploy 2026-02-16 14:53:30 +01:00
master3395
4af0d2e599 CloudFlare DNS: edit records on click (name, type, TTL, value, priority, proxy)
- Add updateDNSRecordCloudFlare backend (dnsManager, view, URL)
- Return real priority in getCurrentRecordsForDomainCloudFlare
- Edit (pencil) button + modal with all fields; Save calls update API
- openEditModal, closeEditModal, saveEditRecord in dns.js
2026-02-16 14:39:46 +01:00
master3395
d5262891f0 Add Angular filesize filter for Modify Website page
modifyWebsite.html uses | filesize for home directory available_space;
filter was missing, causing $injector/unpr FilesizeFilterProvider.
Register app.filter('filesize') with array annotation in all websiteFunctions.js copies.
2026-02-16 14:14:58 +01:00
master3395
77c04fb5b6 Fix Modify Website page: use Angular array annotation for modifyWebsitesController
Prevents $injector:unpr (Unknown provider) when JS is minified by preserving
$scope and $http dependency names in array form.
2026-02-16 14:05:45 +01:00
master3395
06e8a1bd13 Remove Fix Subdomain Logs page; fix view to pass request for ACL
- Remove Fix Subdomain Logs menu item from sidebar
- Remove fixSubdomainLogs and fixSubdomainLogsAction URL routes
- Views: pass request to WebsiteManager (fixSubdomainLogs/ fixSubdomainLogsAction) for correct ACL check
2026-02-16 14:00:52 +01:00