|
|
|
|
|
by metadat
457 days ago
|
|
import requests
r = requests.get('https://theonion.com')
print(r.text)
Hmm, I wonder if you could use subprocess to fetch and run any binary. What kind of sandbox is this running in, and what are the limits?Running arbitrary untrusted code seems like a potential security issue. Edit: @porridgeraisin Got it, thanks! Does this mean outbound http requests only work with domains that support arbitrary requests via `Access-Control-Allow-Origin: *` ? |
|
So, yes, sadly, network requests only work with domains with Access-Control-Allow-Origin: *. I'm looking at adding a backend CORS proxy to fix this.
We also have a Chrome extension with no CORS limitation. The extension lets you right-click Python code snippets on basically any site (Claude, ChatGPT, Deepseek etc.) to run it instantly.
https://chromewebstore.google.com/detail/python-code-runner/...