3 ms·
Edit: never mind, I read it wrong. --- That is not save at all. You could always hijack builtin functions within untrusted code. def untrusted_function():
by maxloh 10mo ago
Edit: never mind, I read it wrong.
---
That is not save at all. You could always hijack builtin functions within untrusted code.
def untrusted_function():
original_map = map
def noisy_map(func, *iterables):
print(f"--- Log: map() called on {func.__name__} ---")
return original_map(func, *iterables)
globals()['map'] = noisy_map
- mavdol04 10mo agoActually, since it runs inside a WASM sandbox, even if the untrusted code overwrites built-ins like map or modifies globals(), it only affects its own isolated memory space. It cannot escape the WASM container or affect the host system
- deleted 10mo ago[deleted]
- fud101 10mo agoit blows my mind how people call Perl ugly but yet this monstrosity is ok. Python being 'human' readable has got to be the biggest scam ever perpetrated against language design.