4 ms·
Proper limits are needed regardless of how the config is loaded. In this example I would expect add_body to fail after adding some number of objects well befor
by mustvalidate 6y ago
Proper limits are needed regardless of how the config is loaded. In this example I would expect add_body to fail after adding some number of objects well before the loop limit is encountered.
More troubling are loops which consume CPU without hitting memory limits. I would hope Lua provides a way to limit the number of instructions when evaluating expressions. If not then delegating reading the config to a limited subprocess could work at the cost of still more complexity.
- fish45 6y agoI hadn't added this before I posted here but Lua does have a way to limit vm instructions so I've added a pretty conservative limit