]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/hnb/discussion.mdwn
response
[ikiwiki.git] / doc / plugins / hnb / discussion.mdwn
1 I've reviewed this plugin's code, and there is one major issue with it,
2 namely this line:
3
4         system("hnb '$params{page}.hnb' 'go root' 'export_html $tmp' > /dev/null");
5
6 This could potentially allow execution of artibtary shell code, if the filename
7 contains a single quote.
8
9 * Fixed with version 0.02 by usage of `$params{content}` -- XTaran
10
11 Which ikiwiki doesn't allow by default, but I prefer to never involve a shell where one is not needed. The otl plugin is a good example of how to safely fork a child process without involving the shell.
12
13 * Had a look at that one as example before writing the hnb plugin, but hnb has different input/output characteristics. I would prefer another solution, too, but as long as it works and is secure, I'm fine with the current (fixed :-) ) solution -- [[XTaran]].
14
15 Other problems:
16
17 * Use of shell mktemp from perl is suboptimal. File::Temp would be better.
18   * Fixed with version 0.02 -- [[XTaran]]
19 * The htmlize hook should not operate on the contents of `$params{page}.hnb`.
20   The content that needs to be htmlized is passed in to the hook in
21   `$params{content}`.
22   * Fixed with version 0.02 -- [[XTaran]]
23
24 If these problems are resolved and a copyright statement is added to the file,
25
26 * Copyright Statement is in their for about a month. -- [[XTaran]]
27
28 I'd be willing to include this plugin in ikiwiki. --[[Joey]]