pkra / mathjax-node-page

mathjax-node for pages
Apache License 2.0
42 stars 20 forks source link

\newcommand's influences should NOT be persistent #80

Open Menci opened 5 years ago

Menci commented 5 years ago

If we use \newcommand in a TeX math, the influences will be persistent in current process.

The expected result is -- all \newcommands should only affect the current requested page.

The harm is that if I run a randering server with this library, a malicious person can submit a request that replaces builtin commands with their owns with \renewcommand, so later requests won't return correct result.

This upstream PR may help: https://github.com/mathjax/MathJax-node/pull/348.