Fixesagent0ai/agent-zero#1609.
Issue: "Unauthenticated Path-Containment Bypass in Agent Zero `/api/image_get`"
https://github.com/agent0ai/agent-zero/issues/1609
Resolve the path-containment bypass in /api/image_get by resolving requested images against the Agent Zero base directory before serving them, including symlink-aware validation and the development RFC fallback path.
Harden SVG and SVGZ responses with nosniff and a sandboxed CSP so uploaded SVGs cannot execute scripts in the Agent Zero origin. Add focused regressions for outside paths, symlink escapes, SVG headers, and development-mode remote validation.
- Fixes 500 error when uploading images with non-ASCII filenames via /api/image_get
- Improves file path handling to support both development and Docker environments
- Adds exception handling to gracefully fall back to Docker path logic if path correction fails
- Ensures robust error handling so path issues do not crash the entire endpoint