In math.js there are vulnerabilities where if a person enters a impossible question, 1:999999999999999999999, it will crash the node.js process, any ideas?
The code I use for calculations:
let resp;
try {
resp = math.evaluate(args.join(" "))
} catch (e) {
return message.channel.send('Please provide a **valid** question')
}
You can use a child process for running the calculations and limiting the maximum memory of processes on your OS, if you are using linux on a raspberry pi for example