]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn
cannot reproduce
[ikiwiki.git] / doc / bugs / Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn
1 Hello,
2
3 I had to fix a location of one page in my repo via `svn move` and now I have
4 a problem with rebuilding my ikiwiki pages:
5
6     ikiwiki --setup ikiwiki.setup
7     [...]
8     tworzenie strony ubuntu/linki.mdwn
9     tworzenie strony knoppix/bootowalny_pendrive_usb.mdwn
10     tworzenie strony helponformatting.mdwn
11     Insecure dependency in eval while running with -T switch at /usr/share/perl5/IkiWiki/Plugin/conditional.pm line 30.
12     BEGIN failed--compilation aborted at (eval 5) line 110.
13
14 Temporarily I've disabled conditional plugin to avoid that bug.
15
16 PS. I still use ikiwiki 1.50 backported for Debian 'sarge'.
17
18 --[[Paweł|ptecza]]
19
20 ---
21
22 Hello again :)
23
24 I've just builded successfully ikiwiki 2.00 package for Debian 'sarge'.
25 Unfortunately, now I still can't to rebuild my ikiwiki pages:
26
27     ikiwiki --setup ikiwiki.setup
28     [...]
29     renderowanie ikiwiki/backport.mdwn
30     renderowanie ikiwiki/instalacja.mdwn
31     renderowanie ikiwiki/problemy.mdwn
32     Insecure dependency in eval while running with -T switch at /usr/share/perl5/IkiWiki.pm line 1005.
33     BEGIN failed--compilation aborted at (eval 5) line 111.
34
35 I didn't apply your following old patch against `Ikiwiki.pm` file:
36
37     --- IkiWiki.pm-orig 2007-05-10 11:16:47.000000000 +0200
38     +++ IkiWiki.pm      2007-05-10 11:16:07.000000000 +0200
39     @@ -993,7 +993,18 @@
40         my $spec=shift;
41         my $from=shift;
42  
43     -   return eval pagespec_translate($spec);
44     +   my $pagespec = pagespec_translate($spec);
45     +
46     +   my $newpagespec;
47     +
48     +   local($1);
49     +   if ($pagespec =~ /(.*)/) {
50     +           $newpagespec = $1;
51     +   } else {
52     +           die "oh";
53     +   }
54     +
55     +   return eval $newpagespec;
56      } #}}}
57  
58      package IkiWiki::PageSpec;
59
60 because `patch` command fails:
61
62     patch -p0 < ../IkiWiki.pm.patch 
63     patching file IkiWiki.pm
64     Hunk #1 FAILED at 993.
65     1 out of 1 hunk FAILED -- saving rejects to file IkiWiki.pm.rej
66
67 Could you please fix that patch?  I guess how to do it, but I don't want
68 to break the code I distribute in my backport ;)
69
70 --[[Paweł|ptecza]]
71
72 > It's not my patch.. IIRC my suggestion was simply to do this: --[Joey]]
73
74         Index: IkiWiki.pm
75         ===================================================================
76         --- IkiWiki.pm  (revision 3565)
77         +++ IkiWiki.pm  (working copy)
78         @@ -1005,7 +1005,7 @@
79                         unshift @params, "location";
80                 }
81          
82         -       my $ret=eval pagespec_translate($spec);
83         +       my $ret=eval possibly_foolish_untaint(pagespec_translate($spec));
84                 return IkiWiki::FailReason->new("syntax error") if $@;
85                 return $ret;
86          } #}}}
87
88 >> Thanks a lot, Joey! It works :)
89 >>
90 >> BTW, I was quite sure that you sent me the old patch via e-mail long time ago.
91 >> Maybe I found it at old ikiwiki home page? I don't remember it now.
92 >>
93 >> --[[Paweł|ptecza]]
94
95 ----
96
97 I'm marking this [[done]] since it only affects sarge. Sarge users should
98 use the patch above. --[[Joey]]