Live data from Hacker News

The dangers of single line regular expressions

greg.molnar.io

71–80 of 133 posts

Re: The dangers of single line regular expressions

#76
post #58
post #57

Seems to me this is more about the danger of passing anything derived from user input into the TEMPLATE side of a templating engine. Why in the world would you ever do that?!? Obviously if you pass data into the variable side of the engine, you hardly have to worry about it at all, since it's already going into a place that was designed for handling arbitrary and possibly-hostile input and been battle-tested at doing…

What if you want to allow users to regex search their documents?

Do it on the client side?

Do it in a sandbox and have aggressive timeouts.

Post reply on HN