Commit Graph

8 Commits

Author SHA1 Message Date
master3395
a4421681bc Merge upstream v2.4.5 into v2.5.5-dev for full stack parity
Integrates webmail and emailDelivery apps, mail-server and install/upgrade
paths, cyberpanel_ols 2.7.0-style binaries, and v2.4.5 UI patterns while
preserving v2.5.5-dev behavior (SnappyMail/PUBLIC_ROOT, childPath in
launchChild, hardened downloads and SSH activity modal).
2026-03-25 20:36:51 +01:00
usmannasir
7eae72e94f Fix CyberPanel API key validation for platform callbacks
Problem: File fixes were failing with "Invalid token" even though the platform was sending the correct API key.

Solution:
- Updated validate_access_token() to accept CyberPanel's own API keys for file operations
- Added three validation options:
  1. FileAccessToken (temporary tokens for active scans)
  2. API key validation with less restrictive admin check
  3. Simple validation for platform callbacks (any valid API key + valid scan)
- Added extract_auth_token() helper to support both Bearer and X-API-Key headers
- Created debug endpoints for testing authentication (/api/ai-scanner/test-auth)
- Added test script for validation testing (supports remote servers via env vars)

This fix allows the platform to use CyberPanel's API key to fix files for any scan,
solving the "File access token has expired" issue for older scans.

Usage for remote testing:
CYBERPANEL_SERVER=http://your-server:8001 \
CYBERPANEL_API_KEY=cp_your_key \
CYBERPANEL_SCAN_ID=your-scan-id \
./test_api_key_fix.sh
2025-10-27 13:51:33 +05:00
usmannasir
03425989d6 add aiscanner file patcher 2025-10-26 01:56:36 +05:00
usmannasir
ae9b954243 bug fix: api 2025-09-30 00:12:48 +05:00
Master3395
e5289bccc4 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
1a429d8b92 Add RESTful API support for listing child domains: Implement listChildDomainsJson endpoint in the API, allowing users to retrieve child domain details with authentication. Update README to document the new API functionality and usage examples. Remove obsolete utility scripts for Windows and Linux to streamline the project.
https://github.com/usmannasir/cyberpanel/issues/1120
2025-09-21 19:52:05 +02:00
Master3395
1a5daf4b16 Add createDockersite API endpoint: Implement functionality to create a dockersite with input validation and error handling. Update urls.py to include the new endpoint.
https://github.com/usmannasir/cyberpanel/pull/1224
2025-09-20 19:17:44 +02:00
usmannasir
6dd7114f6d Initial commit for v2.4.3 2025-08-01 14:56:30 +05:00