Skip to content

Commit

Permalink
internal resource request bug
Browse files Browse the repository at this point in the history
  • Loading branch information
REal0day authored and p-i- committed Apr 17, 2023
1 parent 316f37b commit a2a6f84
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions autogpt/commands/web_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,28 @@ def check_local_file_access(url: str) -> bool:
"""
local_prefixes = [
"file:///",
"file://localhost/",
"file://localhost",
"http://localhost",
"http://localhost/",
"https://localhost",
"https://localhost/",
"http://2130706433",
"http://2130706433/",
"https://2130706433",
"https://2130706433/",
"http://127.0.0.1/",
"http://127.0.0.1",
"https://127.0.0.1/",
"https://127.0.0.1",
"https://0.0.0.0/",
"https://0.0.0.0",
"http://0.0.0.0/",
"http://0.0.0.0",
"http://0000",
"http://0000/",
"https://0000",
"https://0000/"
]
return any(url.startswith(prefix) for prefix in local_prefixes)

Expand Down

0 comments on commit a2a6f84

Please sign in to comment.