Commit Graph

5281 Commits

Author SHA1 Message Date
master3395
a0b88345dd fix(plugins): Improve removeFiles to handle root-owned files with sudo
- Try direct removal first (fastest)
- If that fails, use sudo chown/chmod to fix permissions, then remove
- Final fallback: use sudo rm -rf
- Better error handling and logging at each step

Fixes: Permission denied errors when uninstalling plugins with root-owned files
(examplePlugin, paypalPremiumPlugin, pm2Manager)
2026-01-26 03:15:11 +01:00
master3395
f9573d9155 fix: Remove remaining emailMarketing references from pluginHolder/views.py
Remove emailMarketing manage_url assignments that were left after
skipping the plugin. These were causing issues.
2026-01-26 03:12:50 +01:00
master3395
db7bc3791a fix: Completely remove emailMarketing template reference
Remove commented-out emailMarketing URL reference from template.
Django may still try to parse commented {% url %} tags, causing
'Reverse for emailMarketing not found' error.
2026-01-26 03:12:27 +01:00
master3395
5b30486d24 fix: Replace emACL usage with False since emailMarketing is removed
Replace emACL.checkIfEMEnabled() call with False since emailMarketing
module is no longer available.
2026-01-26 03:11:18 +01:00
master3395
b751caff01 fix: Remove emailMarketing import from websiteFunctions/website.py
emailMarketing was removed from INSTALLED_APPS but websiteFunctions
was still trying to import it, causing ModuleNotFoundError.

Fixes: ModuleNotFoundError: No module named 'emailMarketing'
2026-01-26 03:10:53 +01:00
master3395
806571e0f1 fix: Remove emailMarketing references after removal from INSTALLED_APPS
- Comment out emailMarketing menu item in baseTemplate/index.html
- Skip emailMarketing in pluginHolder/views.py when listing plugins
- Prevents HTTP 500 error when template tries to reverse 'emailMarketing' URL

Fixes: HTTP 500 on /plugins/installed after emailMarketing removal
2026-01-26 03:09:58 +01:00
master3395
618ceb61e5 fix(plugins): Improve auto-cleanup of incomplete plugin directories
- Use pluginInstaller.removeFiles() which handles permissions properly
- Add fallback to rm -rf if pluginInstaller method fails
- Better error handling and logging
- Applied to both install_plugin and install_from_store functions

Fixes: Incomplete plugin directory cleanup failures due to permission issues
2026-01-26 03:09:01 +01:00
master3395
31eb292784 fix: Add emailMarketing URL route to main urls.py
emailMarketing was in INSTALLED_APPS but URL route was missing,
causing 'Reverse for emailMarketing not found' error when template
tries to use {% url 'emailMarketing' %}
2026-01-26 03:07:10 +01:00
master3395
915f7cc5d0 fix: Restore emailMarketing to INSTALLED_APPS
emailMarketing was removed from INSTALLED_APPS but the plugin directory
still exists, causing Django to fail with:
'Model class emailMarketing.models.EmailMarketing doesn't declare an explicit
app_label and isn't in an application in INSTALLED_APPS'

This fixes the HTTP 500 error on /plugins/installed
2026-01-26 03:06:01 +01:00
master3395
41b548e8f5 fix(plugins): Improve 'already installed' check to handle incomplete directories
- Only consider plugin installed if meta.xml exists
- Auto-cleanup incomplete plugin directories during install
- Prevents 'Plugin already installed' error when directory exists but is incomplete

Fixes: Plugin already installed: discordAuth (when directory exists but incomplete)
2026-01-26 03:03:52 +01:00
master3395
1fb039caf4 fix(plugins): Fix uninstall permission errors and Python path issues
- Fix Python path: Replace /usr/local/CyberCP/bin/python with python3 (path doesn't exist)
- Fix removeFiles(): Add permission fixing before deletion to handle .DS_Store, __pycache__, etc.
- Improve 'already installed' check: Only consider plugin installed if meta.xml exists
- Auto-cleanup incomplete plugin directories during install
- Add fallback to rm -rf if shutil.rmtree fails

Fixes:
- [Errno 2] No such file or directory: '/usr/local/CyberCP/bin/python'
- [Errno 13] Permission denied: '.DS_Store', '__pycache__', 'README.md'
- Plugin already installed: discordAuth (when directory exists but incomplete)
2026-01-26 03:03:25 +01:00
master3395
d32f815775 revert(plugins): Remove all plugin auto-registrations from core
Plugins should be installed via Plugin Store, not auto-registered in core.
Plugin registrations (INSTALLED_APPS and URL routes) are added dynamically
during plugin installation via pluginInstaller, not hardcoded in core.

Removed from INSTALLED_APPS:
- fail2ban
- discordAuth (already removed by user)
- googleTagManager
- discordWebhooks (already removed by user)

Removed from urls.py:
- All plugin URL routes (fail2ban, googleTagManager, discordAuth)

These plugins must be installed via Plugin Store, which will automatically
add them to INSTALLED_APPS and urls.py during installation.
2026-01-26 02:57:15 +01:00
master3395
1ef9236514 revert(plugins): Remove plugin auto-registrations from core
Plugins should be installed via Plugin Store, not auto-registered in core.
Plugin registrations (INSTALLED_APPS and URL routes) are added dynamically
during plugin installation, not hardcoded in the core repository.

Reverted:
- Removed fail2ban, discordWebhooks, googleTagManager from INSTALLED_APPS
- Removed plugin URL routes from urls.py
- discordAuth was already removed by user

Kept:
- Automatic lscpd restart after plugin installation (pluginHolder/views.py)
- File ownership/permissions fixes
2026-01-26 02:57:02 +01:00
master3395
c0af88706b feat(plugins): Add plugin registrations and improve installation process
- Add fail2ban, discordAuth, discordWebhooks, googleTagManager to INSTALLED_APPS
- Add URL routes for all new plugins
- Add automatic lscpd restart after plugin installation in pluginHolder/views.py
- Fix file ownership/permissions for baseTemplate/index.html (cyberpanel:cyberpanel 664)

Plugins added:
- fail2ban: Security management plugin
- discordAuth: Discord authentication plugin
- discordWebhooks: Discord webhook notifications plugin
- googleTagManager: Google Tag Manager integration plugin
2026-01-26 02:53:24 +01:00
master3395
8abf8b1b91 Add enhanced security features to premium plugins
- Implement server fingerprinting for license binding
- Add code integrity verification with SHA256 hashes
- Implement domain binding for license validation
- Add time-based re-validation with 1-hour caching
- Create secure_verification_required decorator with multiple security layers
- Update both Patreon and PayPal premium plugins with security enhancements
- Add PayPal verification endpoint (verify-paypal-payment.php)
- Update Patreon endpoint to support server fingerprint and domain binding
2026-01-25 23:36:54 +01:00
master3395
ddc4e8c656 Add NEW/Stale badges to Plugin Store and fix intermittent display issues
- Added NEW badge for plugins updated within last 3 months (90 days)
- Added Stale badge for plugins not updated in last 2 years (730 days)
- Removed Author, Status, and Active columns from Plugin Store view
- Fixed intermittent old table display with cache-busting v7
- Added column count validation to ensure correct 8-column structure
- Added tooltips for NEW and Stale badges with descriptive messages
- Cleared plugin store cache to prevent stale data display
- Updated cache-busting version to v7 to force browser refresh
2026-01-25 22:25:21 +01:00
master3395
56cb95fadd Update pluginHolder with Free/Paid badges and Plugin Information support
- Added Free/Paid badges to Grid View, Table View, and Plugin Store
- Fixed intermittent badge display issues with robust boolean handling
- Updated plugin store to show plugin icons and proper pricing badges
- Removed Deactivate/Uninstall from Plugin Store (only Install/Installed)
- Fixed template syntax errors and duplicate navigation buttons
- Enhanced cache handling for plugin metadata (is_paid, patreon_url, etc.)
- Improved JavaScript cache-busting and isPaid normalization
2026-01-25 20:55:56 +01:00
master3395
b4a9a0741f fix(docker): listContainers HTML page – avoid JSON/cache mix-up
- Add GET /docker/containers for HTML page; GET /docker/listContainers redirects there
- POST /docker/listContainers returns 405 (page uses getContainerList for data)
- Remove duplicate listContainers Angular controller; fix pagination (getContainerList)
- Extend getContainerList API: totalCount, totalPages, currentPage, itemsPerPage
- Add ACTIVITY BOARD-style pagination: Prev/Next, Go to page, Showing X–Y of Z
- Update menu/templates/JS redirects to /docker/containers
- Sync dockerManager.js across app static, STATIC_ROOT, public/static
- Cache-Control on HTML response; cache-bust script ?v=4

Fixes raw JSON instead of UI when loading /docker/listContainers (cache/proxy
serving stored JSON for GET). Use /docker/containers for the page.
2026-01-25 03:56:25 +01:00
Master3395
c234265fdc Merge pull request #1656 from master3395/v2.5.5-dev
Major Plugin Store Improvements, Notification Center & AngularJS Fixes
2026-01-22 20:03:41 +01:00
master3395
67df1a5c3f Add JavaScript to remove duplicate view-toggle divs on page load
- Added code to detect and remove any duplicate view-toggle divs
- Keeps only the one with id='plugins-view-toggle'
- This handles cases where browser cache or template cache shows duplicates
2026-01-22 19:58:54 +01:00
master3395
d38cf84db4 Update View Toggle comment to match user expectation
- Changed comment from 'always shown at top' to simple 'View Toggle'
- This matches what user sees in browser (the correct one with checkmark)
2026-01-22 19:58:31 +01:00
master3395
58f218093f Add unique ID to view-toggle and fix duplicate button selection
- Added id='plugins-view-toggle' to view-toggle div to prevent duplicates
- Updated toggleView() to only select buttons from the main view-toggle
- This should prevent any duplicate button issues
2026-01-22 19:54:29 +01:00
master3395
4d08d1ceab Move view toggle buttons to top, remove duplicate at bottom
- Moved view toggle (Grid View, Table View, Plugin Store, Plugin Development Guide) to top of plugins section
- Removed duplicate view toggle that appeared at bottom
- Now only one set of view toggle buttons appears at the top
2026-01-22 19:50:36 +01:00
master3395
351aefd1a9 Remove duplicate view toggle buttons
- Removed duplicate view toggle section that appeared when plugins exist
- Kept single view toggle that's always visible (after plugins section)
- Fixes issue where Grid View, Table View, Plugin Store buttons appeared twice
2026-01-22 19:49:49 +01:00
master3395
7b1181b231 Add Author field to Plugin Store views (Grid, Table, and Store)
- Added author display to Grid View plugin cards
- Added Author column to Table View
- Added Author column to Plugin Store table view
- Author information is extracted from plugin meta.xml files
- Displays 'Unknown' if author is not specified in meta.xml
2026-01-22 19:48:19 +01:00
master3395
29e4ddd422 Improve AngularJS module reference check in websiteFunctions.js
- Enhanced module check to first try window.app before falling back to angular.module
- Ensures createWordpress controller can register properly
- Fixes [$controller:ctrlreg] error for createWordpress controller
- Applied to all websiteFunctions.js file locations
2026-01-22 19:28:05 +01:00
master3395
fa8980cbe6 Merge branch 'v2.5.5-dev' of https://github.com/master3395/cyberpanel into v2.5.5-dev 2026-01-22 19:25:37 +01:00
master3395
38ba15d1d6 Fix AngularJS controller registration issue
- Make app variable global in system-status.js to fix [$controller:ctrlreg] errors
- Add module reference check in websiteFunctions.js for compatibility
- Ensures all controllers can register properly with the CyberCP module
- Fixes dashboard data loading and WordPress creation page functionality
2026-01-22 19:25:00 +01:00
master3395
8eae98a338 Update phpMyAdmin fallback version from 5.2.2 to 5.2.3
- Updated fallback version in versionFetcher.py to 5.2.3
- Updated fallback version in upgrade.py to 5.2.3
- Uses latest stable phpMyAdmin version (released 2025-10-08)
- Reference: https://www.phpmyadmin.net/files/5.2.3/
2026-01-20 17:41:43 +01:00
master3395
493c40543d Fix phpMyAdmin signin to handle both GET and POST parameters
- Updated phpmyadminsignin.php to accept token and username via both GET and POST
- Fixes issue where phpMyAdmin access fails when accessed with GET parameters
- Maintains backward compatibility with existing POST-based authentication
- Resolves 404 error when accessing phpMyAdmin via CyberPanel interface
2026-01-20 17:34:00 +01:00
master3395
b034d54055 Standardize plugin version format to 1.0.0 and add semantic versioning explanation
- Update examplePlugin and emailMarketing meta.xml to use 1.0.0 format
- Add comprehensive semantic versioning section to plugin help page
- Explain major/minor/patch version numbers with examples
- Standardize all plugins to use three-number version format (X.Y.Z)
- Improve version tracking and update clarity for plugin developers
2026-01-20 01:47:18 +01:00
master3395
07a4c92f65 Add pm2Manager to INSTALLED_APPS and fix duplicate fail2ban
- Add pm2Manager to INSTALLED_APPS to enable template loading
- Fix duplicate fail2ban entry that was causing ImproperlyConfigured error
- Enables pm2Manager/settings.html template to be found by Django
2026-01-20 01:42:43 +01:00
master3395
571a34822f Fix plugin Settings button to use main route instead of /settings/
- Change default manage_url from /plugins/{plugin}/settings/ to /plugins/{plugin}/
- Many plugins don't have a /settings/ route but have a main route
- Ensures Settings button works for plugins like examplePlugin that only have a main route
- Still respects settings_url and url from meta.xml if provided
2026-01-20 01:39:35 +01:00
master3395
f05f850727 Ensure emailMarketing manage_url is always set correctly
- Add fallback handling for emailMarketing in else branch
- Ensures Settings button always has correct URL (/emailMarketing/)
- Prevents any edge case where manage_url might be wrong
2026-01-20 01:37:49 +01:00
master3395
4eb12a5f81 Fix plugin author display and add Settings button
- Add author field extraction from meta.xml in both plugin processing loops
- Update discordWebhooks meta.xml to include author: Master3395
- Update examplePlugin meta.xml to include author: usmannasir
- Add Plugin Settings button next to Deactivate/Uninstall buttons in both grid and table views
- Special handling for emailMarketing core plugin URL (/emailMarketing/ instead of /plugins/emailMarketing/)
- Add btn-settings styling for Settings button with hover effects
2026-01-20 01:31:18 +01:00
master3395
080749eaa4 Add markdown link and image support to plugin help pages
- Convert linked images (badges): [![alt](img_url)](link_url) to clickable <a><img></a>
- Convert regular images: ![alt](img_url) to <img> tags
- Convert regular links: [text](url) to <a> tags
- All external links open in new tab with security attributes
- Preserve existing HTML tags when wrapping paragraphs
- Fixes badge links not working in README.md content
2026-01-20 01:23:44 +01:00
master3395
5dff70c9e6 Add GitHub README.md and CHANGELOG.md fetching for plugin help pages
- Fetch CHANGELOG.md from GitHub if not found locally (non-blocking, 3s timeout)
- Fetch README.md from GitHub if no local help files found
- Provides version history and documentation for plugins from GitHub
- All GitHub fetches are optional and fail silently to avoid slow page loads
- Enhances plugin-specific help pages with complete information
2026-01-20 01:22:03 +01:00
master3395
5bf3499d6f Fix plugin-specific help pages and examplePlugin version
- Update examplePlugin version from 0 to 1.0 in meta.xml
- Implement proper plugin_help view to show plugin-specific information
- Reads plugin meta.xml for name, version, author, description
- Looks for README.md, HELP.md, CHANGELOG.md files in plugin directory
- Displays plugin information and version history
- Now shows plugin-specific help instead of redirecting to development guide
- Individual plugin Help buttons now show plugin-specific information
2026-01-20 01:19:14 +01:00
master3395
1c1886f4c2 Add proper CSS styling for Plugin Development Guide link button
- Add specific CSS rules for a.view-btn to ensure proper styling
- Help button now displays correctly next to Plugin Store button
- Matches styling of other view toggle buttons (hover effects, colors)
- Button is clearly visible and accessible for users
2026-01-20 01:11:09 +01:00
master3395
efb1a03c53 Add Plugin Development Guide button next to Plugin Store
- Add help button next to CyberPanel Plugin Store button
- Links to /plugins/help/ (Plugin Development Guide)
- Helps users understand how to work with plugins
- Button appears in both view toggle sections (with and without plugins)
- Styled consistently with other view toggle buttons
2026-01-20 01:09:43 +01:00
master3395
8cfe946397 Fix remaining code block in help.html - wrap with verbatim
- Wrap second Django template code example (line 500) with {% verbatim %} tags
- Ensures all Django template syntax in code examples is properly escaped
- Fixes remaining 'Invalid block tag' error on line 660
2026-01-20 01:05:47 +01:00
master3395
1fd893357c Fix help.html template - use verbatim tags for code examples
- Wrap Django template code examples with {% verbatim %} tags
- Prevents Django from parsing template syntax in documentation code blocks
- Fixes 'Invalid block tag' error when displaying code examples
- All code examples now display correctly without syntax errors
2026-01-20 01:05:19 +01:00
master3395
d388e993d5 Fix help.html template - escape Django template tags in code examples
- Replace {% with {%% in code examples to prevent template parsing errors
- Fixes 'block tag with name title appears more than once' error
- Code examples now display correctly without being parsed as actual template blocks
2026-01-20 01:01:40 +01:00
master3395
32561dd9e5 Fix processed_plugins tracking - move add() after successful processing
- Move processed_plugins.add() to after plugin is successfully added to pluginList
- Prevents plugins from being marked as processed if they fail validation
- Ensures pm2Manager and other store-installed plugins show up correctly
2026-01-20 00:55:43 +01:00
master3395
bcc73e4352 Fix installed plugins view to show plugins installed from store - final fix
- Add logic to check installed plugins that don't have source directories
- Fixes issue where PM2 Manager (installed from store) wasn't showing
- Moved processed_plugins.add() to correct location in code flow
- Now shows all 4 installed plugins: testPlugin, discordWebhooks, fail2ban, pm2Manager
2026-01-20 00:55:24 +01:00
master3395
ed84555ddf Fix installed plugins view to show plugins installed from store
- Add logic to check installed plugins that don't have source directories
- Fixes issue where PM2 Manager (installed from store) wasn't showing in installed list
- Now shows all installed plugins regardless of whether they have source in /home/cyberpanel/plugins/
- Prevents duplicate plugin entries by tracking processed plugins
2026-01-20 00:53:18 +01:00
master3395
f2acb8bbfc Fix pluginInstaller encoding issues and installation timing
- Add UTF-8 encoding to all file operations in pluginInstaller
- Fix ASCII codec error in removeFromSettings and removeFromURLs
- Add 2 second delay after installation to allow filesystem sync
- Fix fileinput.input encoding issue in removeFromURLs
- Update uninstall confirmation message to warn about data deletion
- Fixes plugin installation and uninstallation from store
2026-01-20 00:47:49 +01:00
master3395
fa6ce67f24 Fix 500 error and pluginInstaller fileinput encoding issue
- Revert GitHub API fetching in installed() view to use local file modification time (prevents timeouts)
- Fix fileinput.input() encoding issue in pluginInstaller.removeFromURLs()
- Replace fileinput with manual file read/write using utf-8 encoding
- Add missing import re to pluginInstaller
- Fixes 500 Internal Server Error on CyberPanel pages
- Fixes plugin installation from store
2026-01-20 00:38:21 +01:00
master3395
046d5458bd Disable GitHub API calls for modify_date in installed() view
- Use local file modification time by default to prevent timeouts
- GitHub API calls commented out (can be enabled if needed)
- Improves page load performance
- Prevents 500 errors from API timeouts
2026-01-20 00:08:46 +01:00
master3395
271507eff2 Add better error handling for pluginInstaller exceptions
- Catch and re-raise exceptions from pluginInstaller.installPlugin()
- Add logging for installation steps
- Improve error messages for debugging
2026-01-19 23:44:52 +01:00