Limit rewrite recursion depth
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
Wed, 28 Mar 2012 14:58:20 +0000 (16:58 +0200)
committerPaul Joseph Davis <davisp@apache.org>
Wed, 25 Apr 2012 21:54:08 +0000 (16:54 -0500)
commitd076976cafc7ae01555f69808a7bdf0e84ec5702
tree3bff2f5d4ac4ca0dfed98bf4c8d14db1e851b088
parent40a4e3343179936cc35d586f78ca99f4c0b65a42
Limit rewrite recursion depth

Loops in the rewriter would end up pegging the CPU until memory was
exhausted. Max recursion is now configurable and limited to 100
iterations.

Fixes: COUCHDB-1441
CHANGES
share/www/script/test/rewrite.js
src/couchdb/couch_httpd_rewrite.erl