response
[ikiwiki] / doc / todo / unified_temporary_file__47__directory_handling.mdwn
1 Many plugins seem to create temporary files. Although it is not much code, it is duplicated, and a 
2 typical place for security bugs.  Would it be worthwhile to have library functions for creating temporary files 
3 and directories?  If nothing else, it would serve as documentation of the "official way".
4
5 Off to cut and paste :-) --[[DavidBremner]]
6
7 > Hmm, I see only three users of temp files in all ikiwiki:
8 > * hnb uses `File::Temp::mkstemp` to create two temp file handles.
9 > * teximg uses `File::Temp::tempdir` to create a temporary directory.
10 > * attachment retrieves a temp file from `CGI::tmpFileName`.
11 > These are three quite different uses of temp files, not subject to
12 > unification. Using `File::Temp` (and avoiding the posibly insecure
13 > `mktemp`, `tmpname`, and `tempnam` functions) is probably as unified as
14 > can be managed. --[[Joey]]