mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 17:40:09 +00:00
Fix path traversal vulnerability in fetchJobDetail
Encode promptId with encodeURIComponent when building the URL to prevent path traversal or routing issues with non-UUID values. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,7 @@ export async function fetchJobDetail(
|
||||
promptId: PromptId
|
||||
): Promise<JobDetail | undefined> {
|
||||
try {
|
||||
const res = await fetchApi(`/jobs/${promptId}`)
|
||||
const res = await fetchApi(`/jobs/${encodeURIComponent(promptId)}`)
|
||||
|
||||
if (!res.ok) {
|
||||
console.warn(`Job not found for prompt ${promptId}`)
|
||||
|
||||
Reference in New Issue
Block a user