Bug #2140

Segfault on config error

Added by crypt 8 months ago. Updated 7 months ago.

Status:Fixed Start:12/31/2009
Priority:Normal Due date:
Assigned to:- % Done:

100%

Category:mod_rewrite
Target version:1.4.26
Missing in 1.5.x:No

Description

he config syntax of lighttpd's rewrite rules are more like associative arrays in PHP then the rewrite syntax of Apache webserver. Thus, a migration from Apache to lighttpd is not really trivial with a certain number of rules. Felt after the 10,000th rule I made a copying error, so that in simple terms the config looked like this:

url.rewrite-once = (
...
"^/foo" => "$0",
"^/(.*)" => "/handler/$1$",
...
)

At some point of lighttpd's development there was an optimization in the handling of the pattern, so that this config mistake triggers a segfault. My little patch closes the error.

mod_rewrite.patch (1.2 KB) crypt, 12/31/2009 02:37 pm

Associated revisions

Revision 2707
Added by stbuehler 7 months ago

Fix segfault with broken rewrite/redirect patterns (fixes #2140, found by crypt)

History

Updated by stbuehler 7 months ago

  • Status changed from New to Fixed

Applied in changeset r2707.

Also available in: Atom