fileUrl interpolated the raw storage key into the path, so a key segment containing a reserved character (`?`, `#`, `%`, space) could be reinterpreted as a query/fragment delimiter. Encode each `/`-separated segment with encodeURIComponent, keeping slashes as literal path separators. Keys are backend-generated today, so this is defence-in-depth. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
862 B
862 B