Description
A script that calls EXECUTE SCRIPT on itself runs infinitely with no depth protection. In 5 seconds it produces 206K+ lines of output before being killed.
Steps to Reproduce
echo "EXECUTE SCRIPT '/tmp/recursive.mdl';" > /tmp/recursive.mdl
echo "EXECUTE SCRIPT '/tmp/recursive.mdl'" | mxcli -p project.mpr
# Runs forever: "Executing script: /tmp/recursive.mdl" repeated infinitely
Expected
Error after a reasonable recursion depth (e.g., 16 or 32 levels): "maximum script nesting depth exceeded".
Suggested Fix
Track script depth in ExecContext or pass a depth counter through executeScript. Reject when depth exceeds a threshold.
Description
A script that calls
EXECUTE SCRIPTon itself runs infinitely with no depth protection. In 5 seconds it produces 206K+ lines of output before being killed.Steps to Reproduce
Expected
Error after a reasonable recursion depth (e.g., 16 or 32 levels): "maximum script nesting depth exceeded".
Suggested Fix
Track script depth in
ExecContextor pass a depth counter throughexecuteScript. Reject when depth exceeds a threshold.