]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/Wrapper_config_with_multiline_regexp.mdwn
web commit by bremner: added link to sourcehighlight plugin
[ikiwiki.git] / doc / todo / Wrapper_config_with_multiline_regexp.mdwn
1 Turning the wikilink regexp into an extended regexp on the svn trunk seems
2 to have broken the setuid wrapper on my system, because of two reasons:
3 First, the wrapper generator should turn each newline in $configstring into
4 `\n` in the C code rather than `\` followed by a newline in the C code.
5 Second, the untainting of $configstring should allow newlines.
6
7 > Both of these problems were already dealt with in commit r3714, on June
8 > 3rd. Confused why you're posting patches for them now. [[done]] --[[Joey]]
9
10     Modified: wiki-meta/perl/IkiWiki.pm
11     ==============================================================================
12     --- wiki-meta/perl/IkiWiki.pm (original)
13     +++ wiki-meta/perl/IkiWiki.pm Mon Jun 11 10:52:07 2007
14     @@ -205,7 +205,7 @@
15      
16      sub possibly_foolish_untaint ($) { #{{{
17       my $tainted=shift;
18     - my ($untainted)=$tainted=~/(.*)/;
19     + my ($untainted)=$tainted=~/(.*)/s;
20       return $untainted;
21      } #}}}
22      
23     
24     Modified: wiki-meta/perl/IkiWiki/Wrapper.pm
25     ==============================================================================
26     --- wiki-meta/perl/IkiWiki/Wrapper.pm (original)
27     +++ wiki-meta/perl/IkiWiki/Wrapper.pm Mon Jun 11 10:52:07 2007
28     @@ -62,7 +62,7 @@
29       }
30       $configstring=~s/\\/\\\\/g;
31       $configstring=~s/"/\\"/g;
32     - $configstring=~s/\n/\\\n/g;
33     + $configstring=~s/\n/\\n/g;
34      
35       #translators: The first parameter is a filename, and the second is
36       #translators: a (probably not translated) error message.