]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/unified_temporary_file__47__directory_handling.mdwn
Review request
[ikiwiki.git] / 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]]
15
16 >> OK, fair enough. Somehow the code in teximg made me think it was
17 >> all a bit complicated. But after I played with it a bit more (and used File::Temp)
18 >> I tend to agree, there is no real problem there to fix.  
19 >> Feel free to mark [[done]] [[DavidBremner]]