ValueError exception when requesting an image on a different drive
Open
Bug
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
https://github.com/comfyanonymous/ComfyUI/blob/9562a6b49e63e63a16f3e45ff4965f72385f51fa/server.py#L270-L271
This code attempts to determine whether the requested file is in the output directory. If not then it returns a 403 error. However, if the requested file is on a different drive to the output dir, then `os.commonpath` will raise a `ValueError`, because files on different drives cannot have any common components.
`os.commonpath` is used in a similar way in various other places.
Contributor guide
Assessment
This issue has not been assessed yet.