]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/prune_causing_taint_mode_failures.mdwn
web commit by ali: Don't wrap my error message!
[git.ikiwiki.info.git] / doc / bugs / prune_causing_taint_mode_failures.mdwn
1 Using ikiwiki version 2.5gpa1 (the backport to Debian 3.1), I suddenly started getting the following error when rebuilding the wiki:
3 > successfully generated /home/ikiwiki/cgi-bin/ikiwiki.cgi
4 > Insecure dependency in rmdir while running with -T switch at /usr/share/perl5/IkiWiki/Render.pm line 242.
5 > BEGIN failed--compilation aborted at (eval 5) line 130.
7 I've no idea what's happening (hey, I'm a C programmer), but I've hacked prune() to workaround this as follows:
9 use Scalar::Util qw(tainted);
11 sub prune ($) { #{{{
12         my $file=shift;
14         unlink($file);
15         my $dir=dirname($file);
16         if (!tainted($file) && $dir =~ /^(.*)$/) {
17                 $dir = $1;
18         }
19         while (rmdir($dir)) {
20                 $dir=dirname($dir);
21                 if (!tainted($file) && $dir =~ /^(.*)$/) {
22                         $dir = $1;
23                 }
24         }
25 } #}}}