Commit Graph

3 Commits

Author SHA1 Message Date
markmorado
bba66d2d2c fix: add missing action mappings for reinstall and change-password in LoggingService
- Added 'reinstall': 'reinstalled' mapping in action_messages
- Added 'change-password': 'password changed' mapping in action_messages
- Fixes HTTP 400 Invalid action error for new VM/LXC operations
- All operations now properly logged to audit_logs table

Related operations:
- POST /api/{server_id}/vm/{vmid}/reinstall
- POST /api/{server_id}/vm/{vmid}/change-password
- POST /api/{server_id}/container/{vmid}/change-password

Adds:
- BUGFIX_REPORT.md - detailed bug analysis and fix
- TEST_NEW_OPERATIONS.md - operation documentation
- test_new_operations.py - verification script
2026-04-29 22:37:52 +02:00
Claude
91ff467f2f security: fix critical vulnerabilities and code quality issues
Critical fixes:
- init_admin.py: replace hardcoded admin123 password with ADMIN_PASSWORD env var
- proxmox_client.py, models.py: change verify_ssl default from False to True
- api/proxmox.py: use server.verify_ssl instead of hardcoded verify=False in websocket handler
- ssh_client.py: replace AutoAddPolicy (MITM-vulnerable) with WarningPolicy + load_system_host_keys

Security hardening:
- main.py: add security headers middleware (CSP, X-Frame-Options, HSTS, X-XSS-Protection, Referrer-Policy)
- main.py: fix CORS — allow_credentials=True is incompatible with allow_origins=["*"]; read origins from CORS_ORIGINS env var
- auth.py, logging_middleware.py: validate X-Forwarded-For/X-Real-IP to prevent IP spoofing

Performance:
- monitoring_worker.py: wire up cleanup_expired_connections() as hourly scheduled job (was defined but never called)

Code quality:
- logging_service.py: move `import json` from inside function to module level
- ssh_client.py, proxmox_client.py, api/proxmox.py, rbac/migration.py, task_queue_service.py: replace all bare `except:` with `except Exception:`
- .env.example, config.py: document ADMIN_PASSWORD and CORS_ORIGINS settings

https://claude.ai/code/session_019rK2wvaWg5zXFwmAPPEB7R
2026-03-06 15:57:20 +00:00
f5a3903f5d Add complete project structure and all files 2025-12-15 13:03:29 +05:00