mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
fix(code-runtime-python): bind str for dispatch's rejection message conversion
The review's remaining non-blocking suggestion: dispatch's call_failure(str(exc)) resolved the builtin str at call time, so a program rebinding __main__.str could run a hostile callable when the binding-rejection message is formatted. Bind _str into _run locals and use it in dispatch.
This commit is contained in:
@@ -690,7 +690,7 @@ describe('PythonCodeRuntime — programs and bindings', () => {
|
||||
'try:',
|
||||
' await tools.fail({})',
|
||||
'except RuntimeError as e:',
|
||||
' caught = str(e)',
|
||||
' caught = e.args[0] if e.args else ""',
|
||||
'except Exception as e:',
|
||||
' caught = "WRONG TYPE: " + type(e).__name__',
|
||||
'return caught',
|
||||
|
||||
Reference in New Issue
Block a user