summaryrefslogtreecommitdiff
path: root/doc/bugs
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-21 06:19:13 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-21 06:19:13 +0000
commitb1fecf16daa5e6652b603e918283f12d8584e869 (patch)
treeca31cbbb8d41775309fa3285e4d1afa872b13172 /doc/bugs
parent17c0deafcddc518f4b825454b4f36e3e25cca8e3 (diff)
web commit by ali: Reporting bug with prune and taint mode
Diffstat (limited to 'doc/bugs')
-rw-r--r--doc/bugs/prune_causing_taint_mode_failures.mdwn25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/bugs/prune_causing_taint_mode_failures.mdwn b/doc/bugs/prune_causing_taint_mode_failures.mdwn
new file mode 100644
index 000000000..3187ed54f
--- /dev/null
+++ b/doc/bugs/prune_causing_taint_mode_failures.mdwn
@@ -0,0 +1,25 @@
+Using ikiwiki version 2.5gpa1 (the backport to Debian 3.1), I suddenly started getting the following error when rebuilding the wiki:
+
+successfully generated /home/ikiwiki/cgi-bin/ikiwiki.cgi
+Insecure dependency in rmdir while running with -T switch at /usr/share/perl5/IkiWiki/Render.pm line 242.
+BEGIN failed--compilation aborted at (eval 5) line 130.
+
+I've no idea what's happening (hey, I'm a C programmer), but I've hacked prune() to workaround this as follows:
+
+use Scalar::Util qw(tainted);
+
+sub prune ($) { #{{{
+ my $file=shift;
+
+ unlink($file);
+ my $dir=dirname($file);
+ if (!tainted($file) && $dir =~ /^(.*)$/) {
+ $dir = $1;
+ }
+ while (rmdir($dir)) {
+ $dir=dirname($dir);
+ if (!tainted($file) && $dir =~ /^(.*)$/) {
+ $dir = $1;
+ }
+ }
+} #}}}