Files
CyberPanel/aiScanner/api.py
usmannasir 856c29184e Fix replace-file API to use temp file approach instead of here-document
- Write content to /home/cyberpanel/scanner_temp_{scan_id}_{timestamp}.tmp first
- Use Python open() instead of shell here-document to avoid:
  - lscpd connection reset for large files (>2KB)
  - EOF_MARKER conflicts in file content
  - Shell command size limits
- Copy temp file to user directory using executioner with user context
- Clean up CyberPanel temp file after copy
- Fixes: [Errno 104] Connection reset by peer when writing large files
2025-10-26 15:18:26 +05:00

71 KiB