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