+>> Okay, I'll improve this behaviour. Maybe: if tempdir croak rerun it to get another not existing dir? (But only x times so that this is no endless loop, with x maybe = 3).
+>> Then it would not be necessary to inform the user about not generating the image.
+
+>>> Or just propigate up an error message. If it's failing, someone is
+>>> probably trying to DOS ikiwiki or something. :-)
+
+Fixed. I now use eval { create_tmp } and then: if ($?) { $returncode = 0 } else { save .tex file ... } ...
+
+
+> I'm not sure why you're sanitising the PATH before calling latex. This could be problimatic on systems where latex is not in /bin or /usr/bin
+
+>> Okay what do you suggest to use as PATH?
+>> I'll have to change the default settings, since we ikiwiki runs in taint mode. (which is good ;-))
+
+>>> But, ikiwiki already sanitises path and deletes the IFS and CDPATH etc.
+>>> See ikiwiki.in.
+
+Fixed. I'll removed these two lines completly.
+
+-----
+Okay here an short timetable how I want to proceed further:
+
+* Until weekend (21-22. July) I'll try to fix all errors above.
+* From 22.July until 29. July I'll try to set up a first security check
+ My plans are two parts of a security check:
+ * One with an array of blacklisted regular expression. (This would blacklist all the well known and easy to fetch things like \include {/path/to/something} and things like closing the math formula environment ($$).
+ * the second step will be based on Tom::latex, which will help to parse and get a tree view of the code.
+
+Okay what do you think of this procedure?