When I was using the image_url parameter with the api it was giving me the ssrf attempt error.
I found a little logic bug on line (55-56) and (133-134) in the file api_router.py
Instead of
not image_url.startswith("http://") or not image_url.startswith("https://")
Use could use
not (image_url.startswith("http://") or image_url.startswith("https://"))
Thanks for the acknowledgment. Pretty stupid mistake, probably fixed something else and didn't test this piece of code. In the next release, which will be one of these days, it will be fixed.
Hello,
When I was using the
image_url
parameter with the api it was giving me the ssrf attempt error.I found a little logic bug on line
(55-56)
and(133-134)
in the fileapi_router.py
Instead of
not image_url.startswith("http://") or not image_url.startswith("https://")
Use could usenot (image_url.startswith("http://") or image_url.startswith("https://"))