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
This commit is contained in:
master3395
2026-01-04 21:04:51 +01:00
parent b1adb8f52e
commit ed7d4743b6
10 changed files with 662 additions and 356 deletions

View File

@@ -190,7 +190,8 @@ class secMiddleware:
pathActual.find('saveSpamAssassinConfigurations') > -1 or
pathActual.find('docker') > -1 or pathActual.find('cloudAPI') > -1 or
pathActual.find('verifyLogin') > -1 or pathActual.find('submitUserCreation') > -1 or
pathActual.find('/api/') > -1 or pathActual.find('aiscanner/scheduled-scans') > -1)
pathActual.find('/api/') > -1 or pathActual.find('aiscanner/scheduled-scans') > -1 or
pathActual.find('plugins/discordWebhooks/webhook/') > -1)
if isAPIEndpoint:
# For API endpoints, still check for the most dangerous command injection characters