Commit Graph

5224 Commits

Author SHA1 Message Date
master3395
dfa0d5e223 Add Modify Date column, GitHub commit date fetching, and plugin store caching
- Added Modify Date column to both Table View and Plugin Store
- Implemented GitHub API integration to fetch last commit dates
- Added caching system for plugin store to prevent rate limit errors
- Enhanced plugin store with installed/enabled status enrichment
- Added comprehensive plugin development guide
- Updated testPlugin meta.xml author to usmannasir
2026-01-19 22:55:59 +01:00
master3395
d1f56031dc Add automatic rainloop to snappymail data migration for 2.4.4 -> 2.5.5-dev upgrades
- Added migrateRainloopToSnappymail() function to automatically migrate email data
- Migrates from /usr/local/lscp/cyberpanel/rainloop/data to /usr/local/lscp/cyberpanel/snappymail/data
- Uses rsync to preserve permissions and ownership
- Updates include.php files to use new snappymail path
- Includes safety checks to prevent data overwriting
- Added migration logic to cyberpanel_upgrade.sh
- Updated default paths from rainloop to snappymail
- Deprecates rainloop folder in 2.5.5-dev
2026-01-19 20:55:51 +01:00
master3395
ac2b30f2ee Fix topProcesses page: Remove auto-refresh and fix double percentage signs
- Remove auto-refresh timeout (3 seconds) from topProcesses page
- Add manual refresh button in page header
- Fix double percentage signs (%% -> %) in CPU Time Distribution
- Remove duplicate serverStatus.js script loading in footer_scripts block

Changes:
- Removed $timeout($scope.topProcessesStatus, 3000) from serverStatus.js
- Removed extra % sign from template (backend already includes % in values)
- Added refresh button with loading state indicator
2026-01-19 20:21:12 +01:00
master3395
4b5b3a281f Fix createUser template to match v2.4.4 - remove Home Directory section and user_filters load
- Removed {% load user_filters %} which is not needed in v2.4.4
- Removed Home Directory selection section (not in v2.4.4)
- Changed securityLevels to use direct Django template rendering instead of JSON encoding
- Template now matches GitHub v2.4.4 exactly
2026-01-19 19:24:13 +01:00
master3395
3f613b2d33 Fix log parsing: correctly reconstruct resource path and timestamp
- Fixed timestamp parsing to combine fields 3 and 4 (timestamp can be split across fields)
- Fixed resource path parsing to handle query parameters (path may span multiple fields)
- Fixed size extraction to use field 9 instead of field 8 (size comes after status code)
- Resource path now correctly reconstructed until HTTP/version field is found
2026-01-19 18:55:56 +01:00
master3395
1e59ac7c03 Fix: Remove fallback to master domain log file for child domains
- Removed fallback logic that was reading from master domain log file when child domain log file was empty
- This was causing cross-contamination - showing API logs when viewing cmstest logs
- Now only reads from the specific domain's log file as determined by _get_log_file_path()
- Fixed log parsing to correctly extract resource path (field 5) and size (field 8)
- Log format doesn't include domain name, so domain is determined by which log file is read

The issue was that when cmstest log file was old/empty, the code was falling back to
reading from newstargeted.com.access_log which contained logs from all sub-domains,
causing API logs to appear when viewing cmstest logs.
2026-01-19 18:55:32 +01:00
master3395
0134ce1ce6 Add domain filtering to access log display
- Added domain filtering in getDataFromLogFile() to only show log entries for the requested domain
- Handles cases where vhost config hasn't been updated and multiple sub-domains log to the same file
- Filters out entries from other domains even if they're in the same log file
- Added error handling for malformed log entries
- Added fallback to master domain log file if child domain log file doesn't exist or is empty

This ensures that when viewing logs for a sub-domain, only that sub-domain's logs are displayed,
even if the vhost configuration still points to the master domain's log file (which needs to be fixed separately).
2026-01-19 18:49:06 +01:00
master3395
a0113dd7aa Permanent fix: ensure all new child domains get correct log configuration
- Fixed perHostDomainConf() to replace {virtualHostName} placeholder in olsChildConf template
- Updated lswsChildConf template to use master domain log directory
- Updated lswsRediConfChild and lswsRediConfChildWWW templates to use master domain log directory
- Added automatic log directory and log file creation for child domains during creation
- Log files are now created at /home/{masterDomain}/logs/{childDomain}.{access|error}_log
- Ensures all newly created sub-domains automatically have separate log files from the start

This permanent fix ensures that when child domains are created:
1. VHost config uses correct log paths pointing to master domain's log directory
2. Log directory is created if it doesn't exist
3. Separate log files are created for each child domain with proper permissions
4. Works for both OpenLiteSpeed (OLS) and LiteSpeed Enterprise (LSWS) configurations

Fixes the root cause so all future child domain creations will have correct log configuration automatically.
2026-01-19 18:46:16 +01:00
master3395
7295a9e6a5 Fix sub-domain log viewing: properly handle child domain log paths
- Added _get_log_file_path() helper method to correctly determine log file paths
- For child domains (sub-domains), logs are stored in master domain's log directory
- Updated getDataFromLogFile() and fetchErrorLogs() to use the helper method
- Fixes issue where sub-domain logs couldn't be viewed in CyberPanel UI
- Logs are now correctly located at /home/{master_domain}/logs/{subdomain}.{access|error}_log

This resolves the bug where viewing logs for sub-domains would fail because
the code was looking for logs in /home/{subdomain}/logs/ instead of the
correct location /home/{master_domain}/logs/{subdomain}.{access|error}_log
2026-01-19 18:39:19 +01:00
master3395
7098cec0a0 Remove duplicate createUserCtr controller - merge home directory functionality into external JS file 2026-01-19 18:29:18 +01:00
master3395
a326d0d99d Fix createUser template: correct URL path, use AngularJS delimiters, fix controller logic 2026-01-19 18:26:24 +01:00
master3395
d1ce1a8817 Fix Django template syntax error - use AngularJS delimiters for || operator in modifyUser 2026-01-19 18:24:47 +01:00
master3395
702ed0fb17 Fix AngularJS delimiters in modifyWebsite template for consistency 2026-01-19 18:24:11 +01:00
master3395
78b71a61bd Fix Django template syntax error - use AngularJS delimiters for || operator 2026-01-19 18:23:54 +01:00
master3395
cb9982ce92 Add user_filters to modifyUser template for consistency 2026-01-19 18:22:10 +01:00
master3395
c12dd4d57c Add Django filesize template filter to fix createUser and modifyWebsite errors 2026-01-19 18:20:57 +01:00
master3395
e14b100bff Add AngularJS filesize filter to fix createUser page error 2026-01-19 18:20:21 +01:00
master3395
bd750fb872 Fix dashboard data binding - use ng-bind instead of template syntax and add ng-cloak 2026-01-19 18:16:56 +01:00
master3395
7e23579142 Fix dashboard data loading - add error handling and force AngularJS updates 2026-01-19 18:15:40 +01:00
master3395
42ef510119 Add icon support for View Details button in .htaccess notification 2026-01-19 18:10:21 +01:00
master3395
c5d54344c6 Force icon display with !important and add info icon to Learn More button 2026-01-19 18:07:33 +01:00
master3395
f6216d9d3f Fix Learn More button text visibility and ensure .htaccess icon displays 2026-01-19 18:06:19 +01:00
master3395
4e274578ac Make Learn More button text prominent and fix notification links 2026-01-19 18:03:39 +01:00
master3395
f5bf81318e Add Learn More button to all notifications and improve button styling 2026-01-19 18:00:44 +01:00
master3395
565a677a5f Fix notification center text overflow - ensure all text stays inside container 2026-01-19 17:42:17 +01:00
master3395
16608ffc3b Improve notification center design - wider, better spacing, button-style links 2026-01-19 17:40:28 +01:00
master3395
97068705a2 Add notification center button and fix stat-card/activity board loading 2026-01-19 17:37:47 +01:00
master3395
0b2187e3f9 Implement 24-hour dismissal for notifications (backup, ai-scanner, htaccess) 2026-01-19 17:32:29 +01:00
master3395
fb1addaf4b Remove discordWebhooks from base config - plugin installer handles it dynamically 2026-01-19 17:30:25 +01:00
master3395
618c858b77 Restore discordWebhooks plugin configuration - plugin installer handles installation 2026-01-19 17:29:06 +01:00
master3395
69029777a8 Fix static file serving: Allow /static/ paths in secMiddleware and add static file URL pattern 2026-01-19 17:26:58 +01:00
Master3395
fade7c8ec7 Move guides to docs
Move guides to docs
2026-01-10 03:43:36 +01:00
Master3395
c7625c318f Merge pull request #1650 from master3395/v2.5.5-dev
V2.5.5 dev ModSecurity binary fix
2026-01-10 03:27:32 +01:00
master3395
35a6fb6792 Fix ModSecurity LMDB dependency crash (Issue #1626)
- Always download compatible ModSecurity binary after installation
- Removes conditional check for custom_ols_marker
- Fixes undefined symbol: mdb_env_create error
- Prevents OpenLiteSpeed crashes with SIGSEGV signal 11
- Compatible with Ubuntu 24.04, RHEL 8/9, Debian 11/12

The fix ensures that compatible ModSecurity binaries (built without
LMDB dependency or with LMDB statically linked) are always used,
preventing the runtime symbol lookup errors that cause crashes.

Related: https://github.com/usmannasir/cyberpanel/issues/1626
2026-01-10 03:22:45 +01:00
master3395
ea5be31de5 Fix issue #1643: Fix downloadFile function to properly parse query parameters
- Changed from incorrect URI splitting to proper request.GET.get() method
- Added proper URL decoding with unquote()
- Fixed both downloadFile and RootDownloadFile functions
- Added path normalization for additional security
- Added file existence validation
- Improved error messages to match reported error format

This fixes the 'Unauthorized access: Not a valid file' error when downloading files from the file manager.
2026-01-07 23:47:23 +01:00
Master3395
b1627aff0f Merge pull request #1645 from master3395/v2.5.5-dev
Refactor: replace url() with path() for Django routes in plugin Insta…
2026-01-06 19:25:21 +01:00
master3395
641f2befca Refactor: replace url() with path() for Django routes in plugin Installer
- Updated pluginHolder/urls.py to use path() instead of url()
- Added new API routes for plugin installation, uninstallation, enable, and disable
- Compatible with Django 4.x (url() was removed in Django 4.0)

Ref: PR 1644
2026-01-06 19:23:04 +01:00
Master3395
646866f302 Merge pull request #1642 from master3395/v2.5.5-dev
Security: Update Python packages to fix critical vulnerabilities
2026-01-04 22:25:03 +01:00
master3395
764913a842 Security: Update Python packages to fix critical vulnerabilities
Fixed 5 critical security vulnerabilities in Python dependencies:

1. Tornado (6.4.1 -> >=6.4.2)
   - CVE-2024-52804: DoS via HTTP cookie parser
   - CVE-2025-47287: DoS via multipart/form-data parser

2. Requests (2.32.3 -> >=2.32.4)
   - CVE-2024-47081: URL parsing may leak .netrc credentials

3. Cryptography (43.0.0 -> >=43.0.1)
   - CVE-2024-12797: Vulnerable statically linked OpenSSL
   - PVE-2024-73711: Another OpenSSL vulnerability

4. PyJWT (unpinned -> >=2.10.1)
   - Multiple vulnerabilities in unpinned versions

5. psutil (unpinned -> >=7.2.0)
   - Security issues in older versions

Changes:
- Updated requirments.txt with secure minimum versions
- Added requirements-secure.txt for documentation

All packages updated to secure versions that address these CVEs.
2026-01-04 22:22:48 +01:00
Master3395
b91f1869aa Merge pull request #1641 from master3395/v2.5.5-dev
Fix: Enable website creation for regular users
2026-01-04 22:06:27 +01:00
master3395
091eb95e3a Fix: Enable website creation for regular users
- Fixed bug where regular users (UserACL) cannot create websites
- Changed UserACL createWebsite permission from 0 to 1
- Also enabled modifyWebsite and deleteWebsite for consistency
- Resolves issue where non-admin/reseller users were blocked from creating websites

Related changes:
- UserACL: createWebsite: 0 -> 1
- UserACL: modifyWebsite: 0 -> 1
- UserACL: deleteWebsite: 0 -> 1
- suspendWebsite remains 0 (admin-only feature)

This allows regular users to create, modify, and delete their own websites
while maintaining proper ownership checks and security controls.
2026-01-04 22:03:27 +01:00
Master3395
5d47436fb3 Merge pull request #1640 from master3395/v2.5.5-dev
V2.5.5 dev plugin installation and management
2026-01-04 21:33:07 +01:00
master3395
43dc004287 Add PLUGINS.md reference to INDEX.md
- Added Plugin System Guide to Plugins & Extensions section
- Added plugin system to Feature-Specific Guides section
- Author: master3395
2026-01-04 21:29:24 +01:00
master3395
8dd71a35f4 Add comprehensive plugin system documentation (PLUGINS.md)
- Complete guide for plugin installation and management
- Plugin development guide with code examples
- Plugin structure and requirements documentation
- TestPlugin reference guide
- Best practices and troubleshooting sections
- Author: master3395
2026-01-04 21:26:19 +01:00
master3395
7a8a9a9715 Merge branch 'v2.5.5-dev' of https://github.com/master3395/cyberpanel into v2.5.5-dev 2026-01-04 21:13:35 +01:00
master3395
c6ba63e537 Add plugin system enhancements and testPlugin
- Enhanced plugin installer to properly extract and install plugins
- Added security middleware exception for plugin webhook endpoints
- Improved plugin listing with better error handling
- Added testPlugin as example plugin for CyberPanel plugin system
- Updated INSTALLED_APPS and URL routing for plugins

Author: master3395
2026-01-04 21:04:51 +01:00
Master3395
6e36378917 Merge pull request #1639 from master3395/v2.5.5-dev
- Fixed CloudFlare proxy toggle button to display as oblong with a round dot
- Enable CloudFlare proxy by default for all domains/subdomains except mail domains
- Automatically add AAAA (IPv6) DNS records when creating domains/subdomains
- Added GetServerIPv6() function to retrieve server IPv6 address
- Updated DNS template styling and Angular.js binding for toggle buttons
2026-01-04 04:17:02 +01:00
master3395
da576c62db DNS improvements: CloudFlare proxy toggle styling, auto AAAA records, proxy defaults
- Fixed CloudFlare proxy toggle button to display as oblong with round dot
- Enable CloudFlare proxy by default for all domains/subdomains except mail domains
- Automatically add AAAA (IPv6) DNS records when creating domains/subdomains
- Added GetServerIPv6() function to retrieve server IPv6 address
- Updated DNS template styling and Angular.js binding for toggle buttons
2026-01-04 04:15:46 +01:00
Master3395
d94322dccb Merge pull request #1638 from master3395/v2.5.5-dev
V2.5.5 dev
2026-01-04 03:59:51 +01:00
master3395
d2a649251d Fix session status logic: Add IDLE state for logged-in users without processes, improve process detection with TTY filtering, enhance status messages with clearer explanations 2026-01-04 03:57:53 +01:00