OPHoperHPO / image-background-remove-tool

✂️ Automated high-quality background removal framework for an image using neural networks. ✂️
https://carve.photos
Apache License 2.0
1.39k stars 272 forks source link

Possible ssrf attempt error fixup #111

Closed DouglasHoang closed 2 years ago

DouglasHoang commented 2 years ago

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 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://"))

MrFox131 commented 2 years ago

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.