Commit Graph

82 Commits

Author SHA1 Message Date
Master3395
0aca2a5aaf Implement ImunifyAV asset management and routing
- Added a static method to ensure ImunifyAV assets are created and permissions set correctly in CageFS.py.
- Updated the URL routing in urls.py to include paths for ImunifyAV, supporting both legacy and new routes.
- Modified the ImunifyAV HTML template to use Django's URL template tag for better maintainability.
- Enhanced the cyberpanel_fixes.sh script to ensure ImunifyAV UI assets are installed during fixes.
- Improved database user resolution and password handling in mysqlUtilities.py for better security and reliability.

This update enhances the integration and management of ImunifyAV within the CyberPanel environment.
2025-11-15 23:25:13 +01:00
Master3395
b6528bb21d Enhance Postfix management and validation in installation scripts
- Refactored the enableDisableEmail function to improve handling of Postfix service enabling and disabling, including better error logging and cleanup of stale marker files.
- Added a new method in mailUtilities to check if Postfix is installed, ensuring that DKIM setup only proceeds if Postfix is available.
- Updated virtualHostUtilities to verify Postfix installation before attempting DKIM setup, with appropriate logging for missing markers.
- Improved overall robustness of email service management during installation and configuration processes.

https://github.com/usmannasir/cyberpanel/issues/1570
2025-11-02 20:29:45 +01:00
Master3395
ddf9f5a9b3 Add cron service restart functionality in CronUtil
- Introduced a static method `restartCronService` to restart the cron service across various distributions, ensuring immediate application of changes.
- Updated `website.py` to call `restartCronService` after modifying cron jobs, with error handling to return appropriate responses if the restart fails.
- Enhanced overall reliability of cron job management by ensuring the service is restarted after changes are made.
https://github.com/usmannasir/cyberpanel/issues/1589
2025-10-29 22:55:38 +01:00
Master3395
e745d59a13 Enhance SQL query safety in mysqlUtilities.py
- Updated SQL queries to use backticks around database and table names for improved safety and compatibility.
- Implemented escaping for user inputs in CREATE USER and SET PASSWORD statements to prevent SQL injection vulnerabilities.
- Ensured consistent use of safe variable handling across various database operations, including user creation and privilege grants.
2025-10-24 01:24:22 +02:00
Master3395
cef0192af6 Update PHP version handling to include PHP 8.6 across scripts
- Added PHP 8.6 to the list of system PHP versions and fallback versions in PHPManager.
- Updated return values to include PHP 8.6 in case of errors or empty results.
- Enhanced phpUtilities to recognize PHP 8.6 for CentOS and Ubuntu configurations.
- Adjusted recommended PHP version order to prioritize PHP 8.6.
2025-10-16 22:43:12 +02:00
Master3395
05bcb46fd6 Refactor CyberPanel installation logic to streamline PHP version handling
- Removed local installation function in favor of a direct installation approach.
- Updated installation script to prioritize the development branch for downloading CyberPanel, with a fallback to stable if unavailable.
- Adjusted PHP version lists across various scripts to exclude PHP 8.6 and ensure compatibility with existing versions.
- Enhanced error handling and feedback during installation to improve user experience.
2025-10-16 22:34:18 +02:00
Master3395
293550c588 Enhance PHP support in installation and management scripts
- Added installation logic for PHP 8.6 in the install script, ensuring compatibility with various distributions.
- Updated PHP version lists in the PHPManager to include PHP 8.6 for system checks and fallbacks.
- Modified phpUtilities to recognize PHP 8.6 for CentOS and Ubuntu.
- Adjusted upgrade script to support PHP 8.6 for AlmaLinux 8+ compatibility.
- Revised symlink setup logic to prioritize PHP 8.6 alongside other versions.
2025-10-16 22:26:33 +02:00
usmannasir
4bedb9cd73 Implement real-time disk usage updates with async background processing
This commit implements an improved version of PRs #1575 and #1576 from @bdgreenweb
with critical performance optimizations.

## Background
The original PRs (#1575, #1576) proposed real-time disk usage tracking for file
manager operations. While the feature was valuable for improving user awareness of
disk quotas, there were several concerns:

1. **Performance Impact**: Original implementation used synchronous `executioner()`
   calls that would block file operations until disk calculation completed
2. **Target Branch Issues**: PRs were submitted to the stable branch instead of
   development branch, which could introduce instability
3. **Blocking Operations**: Each file operation would wait for disk usage
   recalculation, potentially causing noticeable delays

## Implementation Changes

### filemanager/filemanager.py
- Added disk usage updates to 9 file operation methods:
  - createNewFile() - After file creation
  - createNewFolder() - After folder creation
  - deleteFolderOrFile() - After deletion (both permanent and trash)
  - restore() - After restoring from trash
  - copy() - After copying files/folders
  - move() - After moving files/folders
  - upload() - After file uploads
  - extract() - After extracting archives
  - compress() - After creating archives

### plogical/IncScheduler.py
- Added CalculateAndUpdateDiskUsageDomain() function for domain-specific updates
- Added command-line argument handler for UpdateDiskUsageForceDomain
- Calculates disk usage for websites, email accounts, and bandwidth

## Key Improvements Over Original PRs

1. **Asynchronous Execution**: Uses `popenExecutioner()` instead of `executioner()`
   - File operations return immediately without waiting
   - Disk usage updates happen in background threads
   - Zero performance impact on user operations

2. **Selective Updates**: Only updates the specific domain affected by the operation
   rather than all domains system-wide

3. **Proper Branch Targeting**: Applied to development branch (v2.5.5-dev) for
   proper testing before stable release

## Benefits
- Real-time disk usage tracking as requested
- No performance degradation
- Users immediately aware of quota usage
- Prevents accidental quota violations
- Better than competitors (cPanel/DirectAdmin) in responsiveness

## Acknowledgments
Thank you @bdgreenweb for the original implementation idea and PRs #1575/#1576.
While we couldn't merge them directly due to the performance and stability concerns
mentioned above, your contribution highlighted an important feature gap. This
implementation preserves your core functionality while addressing the performance
concerns through asynchronous execution.

This will definitely help organizations track disk usage more effectively without
sacrificing file manager performance.
2025-10-08 13:40:16 +05:00
usmannasir
408296c51b Fix phpMyAdmin access issue for authenticated users
- Removed session validation check from phpmyadminsignin.php
- Removed PhpMyAdminAccessMiddleware from settings.py
- These changes were preventing access to phpMyAdmin even for logged-in users
- Reverts problematic authentication flow that was blocking legitimate access
2025-10-06 12:27:33 +05:00
usmannasir
6fb5f65758 Fix ACME challenge path to use centralized Example directory
Update all vhost configurations to use /usr/local/lsws/Example/html/.well-known/acme-challenge
instead of domain-specific paths for better SSL certificate management
2025-10-03 15:50:29 +05:00
usmannasir
d5258ac85b fix static file permissions 2025-10-01 11:46:58 +05:00
usmannasir
80c68d4123 bug fix: login page issue 2025-10-01 03:18:39 +05:00
Master3395
b739b4a038 Update MariaDB version to 12.1 across installation scripts
- Changed MariaDB server version from 10.11 to 12.1 in cyberpanel_upgrade.sh, cyberpanel.sh, install.py, and venvsetup.sh to ensure compatibility with the latest features and security updates.
- Enhanced error handling for branch and commit verification in venvsetup.sh to improve installation reliability.
- Streamlined the requirements file download process with fallback options in venvsetup.sh to handle potential download failures.
2025-09-24 23:45:28 +02:00
Master3395
aaf3b68e14 Update PHP version handling and installation logic across scripts
- Adjusted PHP version priority in cyberpanel_upgrade.sh and install.py to include PHP 8.5 (beta) as the highest priority.
- Enhanced package installation logic in cyberpanel.sh and installCyberPanel.py to install PHP dependencies more robustly, including error handling for missing packages.
- Updated README.md to reflect the new recommended PHP versions and deprecated versions.
- Improved error handling and dependency management in phpUtilities.py and upgrade.py for better installation reliability.
2025-09-24 01:11:23 +02:00
Master3395
cc9a6ad31b Refactor installation scripts for improved service management and compatibility: Updated cyberpanel.sh to enhance PHP package installation logic based on available versions. Improved error handling for systemd service management in install.py and added pip upgrade functionality for better package compatibility. Enhanced PowerDNS database setup and service startup procedures with retry mechanisms and detailed logging. 2025-09-23 23:16:36 +02:00
Master3395
f41b54205b Refactor service management in installation scripts: Updated cyberpanel.sh to enhance the display of access information and system status. Improved install.py by adding comprehensive service checks and fixes for PowerDNS, Pure-FTPd, and database connectivity. Enhanced LiteSpeed configuration handling and ensured critical services are running properly during installation. Added detailed logging for better user feedback. 2025-09-23 22:35:47 +02:00
Master3395
2c57ad595e Enhance CyberPanel functionality with FTP Quota and Bandwidth Management features: Added models, views, and templates for managing FTP quotas and bandwidth resets. Implemented IP blocking functionality with associated views and templates. Updated system scripts for improved repository synchronization and OS detection. Removed outdated workflow files. 2025-09-23 21:09:38 +02:00
Master3395
cd38d6eb29 Update version requirements and enhance upgrade script output: Changed minimum version requirement from 1.9.4 to 2.3.4 in upgrade scripts, improved recovery log messages, and added detailed success and warning messages for the upgrade process. Enhanced user interface elements in the HTML template for better readability. 2025-09-23 20:07:30 +02:00
Master3395
685a464ca5 Fix pysftp dependency issue and optimize WSGI-LSAPI compilation: Removed pysftp from requirements in favor of paramiko, and updated Makefile for proper optimization flags to avoid _FORTIFY_SOURCE warnings during WSGI-LSAPI installation. 2025-09-23 19:06:33 +02:00
Master3395
63ffc8d4f7 Merge branch 'usmannasir:v2.5.5-dev' into v2.5.5-dev 2025-09-23 09:55:51 +02:00
Master3395
c873bfc140 Remove deprecated migration script and update version to 2.4 Build 4: The run_migration.py script has been deleted as it is no longer needed. The version file has been incremented to reflect the latest build. Additionally, the Django settings have been updated to include DEFAULT_AUTO_FIELD for improved primary key handling. 2025-09-23 09:55:27 +02:00
Usman Nasir
e91df945ae Merge pull request #1510 from master3395/v2.5.5-dev
V2.5.5 dev - Firewall ban button, and management
2025-09-23 12:29:21 +05:00
usmannasir
9b9a9cae44 Merge branch 'v2.4.4' into v2.5.5-dev 2025-09-23 10:59:13 +05:00
Master3395
e28e401e9d Enhance ModSecurity rule installation and verification: Update OWASP rules to version 4.18.0, improving detection for installed rules in the FirewallManager. Add checks to verify the existence of OWASP and Comodo configuration files. Update JavaScript to reflect installation status and improve user feedback. Ensure proper logging for installation processes and errors.
https://www.facebook.com/groups/cyberpanel/permalink/3983852698593015/
2025-09-22 18:05:55 +02:00
usmannasir
fb16f4cf56 bug fix: staging site issue 2025-09-22 13:31:20 +05:00
Master3395
3432432f91 Enhance text readability and error handling: Add readability fixes CSS for improved contrast across UI elements. Update text colors in various components for better visibility. Enhance FTP error handling with user-friendly messages and improved path validation in both frontend and backend. Update HTML templates to provide clearer instructions and examples for FTP path input. 2025-09-21 22:26:18 +02:00
Master3395
09c9d67536 Implement Docker network management features: Add endpoints for retrieving and creating Docker networks, and update container management to support network configuration and port mapping updates. Enhance UI for network selection and port editing in the container management interface. Update database schema to include network-related fields.
https://github.com/usmannasir/cyberpanel/issues/923
2025-09-21 21:14:34 +02:00
Master3395
cc07f12017 Add cron job management for website suspension: Implement methods to suspend, restore, and check the status of cron jobs for websites. Update main function to handle new commands for cron management. Enhance child domain handling to ensure cron jobs are suspended/restored appropriately during website suspension processes.
https://github.com/usmannasir/cyberpanel/issues/1097
2025-09-21 20:45:37 +02:00
Master3395
48c9c1ad6a Update README and enhance error handling: Increment version to 2.4 Build 4 and add notes on PHP version management. Improve error logging across multiple modules by replacing BaseException with Exception and utilizing secure error handling methods. Ensure consistent error responses in API and middleware functions for better debugging and user feedback. 2025-09-21 20:36:12 +02:00
Master3395
0161aba5f5 Enhance Imunify installation process: Add checks and fixes for PHP-FPM pool configurations and broken package installations before proceeding with Imunify360 and ImunifyAV installations. Implement auto-fix functionality in the firewall manager for PHP-FPM issues. Update the upgrade module to create missing PHP-FPM pool configurations and restart services as needed. Introduce a new API endpoint to disable two-factor authentication for users, ensuring proper handling and logging of actions.
https://github.com/usmannasir/cyberpanel/issues/1114
2025-09-21 20:13:15 +02:00
Master3395
c2b0eb0a20 Enhance SSL renewal process: Add method to update mail SSL configurations for all domains after renewal. Update mail SSL settings in the Renew class and ensure vhost SSL configurations are updated accordingly. Remove obsolete screenshot file.
https://github.com/usmannasir/cyberpanel/issues/1133

https://github.com/usmannasir/cyberpanel/issues/1119
2025-09-21 19:46:10 +02:00
Master3395
53aea56136 Add home directory management features: Introduce models and views for managing user home directories, including dynamic home directory assignment during user creation. Update frontend to allow selection of home directories and display relevant information. Enhance backend logic for home directory migration and statistics retrieval, improving overall user management capabilities. 2025-09-20 21:50:22 +02:00
Master3395
3032dff01d Implement remote connection handling and progress tracking for backup operations: Introduce a method for attempting connections to remote CyberPanel servers with port fallback. Enhance the frontend to display detailed progress and logs during backup transfers, including error handling and notifications for port fallback usage. Update HTML and JavaScript to support new progress tracking features and improve user feedback during backup and restore processes. 2025-09-20 21:31:41 +02:00
Master3395
5364e3e7d1 Add FTP quota management features: Implement getFTPQuotaUsage and migrateFTPQuotas methods in FTPManager for retrieving quota usage and migrating existing users to the new quota system. Update views and URLs to support these new functionalities. Enhance FTPUtilities with methods for applying quotas to the filesystem and retrieving current quota usage. 2025-09-20 21:07:48 +02:00
Master3395
76f6d346f1 Enhance PHP version management in PHPManager: Implement comprehensive detection of PHP versions across multiple methods, including system checks and package manager queries. Add validation and configuration fixing for PHP installations. Introduce methods to retrieve the latest and recommended PHP versions, improving overall reliability and user feedback in the website management process. 2025-09-20 21:01:51 +02:00
Master3395
af434bcb89 Enhance file deletion process in FileManager: Implement detailed logging for file and directory deletion, including security checks and error handling. Improve handling of immutable flags and ensure proper permissions for suspension pages in website management. Add fallback mechanisms for system file deletions and enhance user feedback on operations. 2025-09-20 20:39:35 +02:00
Master3395
c525af21c5 Implement disk usage refresh feature for email accounts. Add a new endpoint and corresponding view to refresh disk usage, ensuring accurate display in the UI. Update JavaScript and HTML templates to support the new functionality, enhancing user experience with real-time updates. Refactor disk usage calculation for improved accuracy and error handling. 2025-09-19 01:09:48 +02:00
Master3395
317b75bb9a Add container management features: implement update, delete with data, and delete while preserving data functionalities. Update views, URLs, and templates for enhanced user interaction and data safety. Introduce modals for container updates and deletion options, improving overall user experience. 2025-09-18 22:16:42 +02:00
Master3395
6213ff8fdd Add subdomain log fix functionality and update templates. Introduce new views and URLs for fixing subdomain logs, enhance log configuration handling in the upgrade script, and update vHost configuration paths for better log management. Include a new menu item for accessing the log fix interface. 2025-09-18 22:04:05 +02:00
Master3395
8ca3ae1b49 Remove SECURITY_INSTALLATION.md and implement SSL reconciliation features in manageSSL module. Add new views and URLs for SSL reconciliation, enhance mobile responsiveness in templates, and update SSL utilities for improved functionality. Update upgrade script for scheduled SSL reconciliation tasks. 2025-09-18 21:37:48 +02:00
Master3395
9c9d0f3075 Enhance CyberPanel with new features and improvements, including a file integrity verification system, IP blocking functionality, and support for resetting Apache and vHost configurations to default. Update documentation and guides for better user experience. Fix bandwidth reset issues and improve overall system stability. 2025-09-18 20:45:34 +02:00
usmannasir
0e45e6272c debian 13 ols fix 2025-09-18 01:29:38 +05:00
Master3395
1f3d5afe6a Add PhpMyAdmin access middleware and session check for user authentication
- Updated settings.py to include PhpMyAdminAccessMiddleware for enhanced access control.
- Modified phpmyadminsignin.php to check user session and redirect to the login page if not authenticated.
2025-09-15 01:39:21 +02:00
Master3395
1a82700f51 Update PHP version references and improve AlmaLinux 9 compatibility
- Changed PHP symlink from version 8.0 to 8.3 in various scripts to ensure compatibility with the latest PHP version.
- Updated documentation links in the FAQ to point to the new community support page.
- Added checks and fixes for MariaDB installation issues specific to AlmaLinux 9.
- Enhanced the installation script to support additional PHP versions and improve overall installation reliability.
2025-09-15 01:25:52 +02:00
Master3395
583680ff90 Fix monthly bandwidth for websites
Fix monthly bandwidth for websites:
https://github.com/usmannasir/cyberpanel/issues/1496
2025-09-12 10:41:11 +02:00
Master3395
41ead838ef Add sieve by default.
Add sieve by default.
2025-09-10 20:01:52 +02:00
Master3395
0c8ee38c2b Add Almalinux 10 and php 84+85
Add Almalinux 10 and php 84+85
2025-09-07 22:57:53 +02:00
usmannasir
2a9ad35d06 bug fix: php manager turning off uploads 2025-09-03 13:27:00 +05:00
usmannasir
c1f742425c bug fix: imuinfy restore after upgrade 2025-09-03 12:59:55 +05:00
usmannasir
07d86ac549 bug fix: imuinfy restore after upgrade 2025-09-03 02:04:36 +05:00