From: Joey Hess Date: Fri, 5 Jun 2009 20:14:51 +0000 (-0400) Subject: Tighten up matching of bare words inside directives X-Git-Tag: 3.141~38 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/bd78168f71c078c481f6afca899796390133e09e?ds=sidebyside;hp=-c Tighten up matching of bare words inside directives Do not allow an unterminated """ string to be treated as a series of bare words. Fixes runaway regexp recursion/backtracking in strange situations. (See 1d57a21c987a5e970df01efe10acdf69982c2d61 for test case.) --- bd78168f71c078c481f6afca899796390133e09e diff --git a/IkiWiki.pm b/IkiWiki.pm index 061a1c6db..d7c827c89 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1253,7 +1253,7 @@ sub preprocess ($$$;$$) { | "[^"]+" # single-quoted value | - [^\s\]]+ # unquoted value + [^"\s\]]+ # unquoted value ) \s* # whitespace or end # of directive @@ -1276,7 +1276,7 @@ sub preprocess ($$$;$$) { | "[^"]+" # single-quoted value | - [^\s\]]+ # unquoted value + [^"\s\]]+ # unquoted value ) \s* # whitespace or end # of directive diff --git a/debian/changelog b/debian/changelog index be1db6f3c..bbc9b2c15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,10 @@ ikiwiki (3.15) UNRELEASED; urgency=low * Avoid relying on translators preserving the case when translating "discussion", which caused Discussion pages to get unwanted Discussion links. + * Tighten up matching of bare words inside directives; do not + allow an unterminated """ string to be treated as a series + of bare words. Fixes runaway regexp recursion/backtracking + in strange situations. -- Joey Hess Tue, 02 Jun 2009 17:03:41 -0400