Skip to content

Commit

Permalink
[python] fix return value for endpoint in fastapi weblog (#3217)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-papazian authored Oct 10, 2024
1 parent ccc20c6 commit 5c2cdc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/build/docker/python/fastapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ async def view_iast_ssrf_secure(url: typing.Annotated[str, Form()]):
parsed_url = urlparse(str(url))

if parsed_url.hostname not in allowed_domains:
return "Forbidden", 403
return PlainTextResponse("Forbidden", status_code=403)
try:
result = requests.get(parsed_url.geturl())
except Exception:
Expand Down

0 comments on commit 5c2cdc1

Please sign in to comment.