2008-08-28 12:51:01 +02:00
|
|
|
Many plugins seem to create temporary files. Although it is not much code, it is duplicated, and a
|
|
|
|
typical place for security bugs. Would it be worthwhile to have library functions for creating temporary files
|
|
|
|
and directories? If nothing else, it would serve as documentation of the "official way".
|
|
|
|
|
2008-08-28 12:52:11 +02:00
|
|
|
Off to cut and paste :-) --[[DavidBremner]]
|
2008-08-28 19:27:50 +02:00
|
|
|
|
|
|
|
> Hmm, I see only three users of temp files in all ikiwiki:
|
|
|
|
> * hnb uses `File::Temp::mkstemp` to create two temp file handles.
|
|
|
|
> * teximg uses `File::Temp::tempdir` to create a temporary directory.
|
|
|
|
> * attachment retrieves a temp file from `CGI::tmpFileName`.
|
|
|
|
> These are three quite different uses of temp files, not subject to
|
|
|
|
> unification. Using `File::Temp` (and avoiding the posibly insecure
|
|
|
|
> `mktemp`, `tmpname`, and `tempnam` functions) is probably as unified as
|
|
|
|
> can be managed. --[[Joey]]
|
2008-08-29 01:51:31 +02:00
|
|
|
|
|
|
|
>> OK, fair enough. Somehow the code in teximg made me think it was
|
|
|
|
>> all a bit complicated. But after I played with it a bit more (and used File::Temp)
|
|
|
|
>> I tend to agree, there is no real problem there to fix.
|
2008-08-29 02:16:41 +02:00
|
|
|
>> Feel free to mark [[done]] [[DavidBremner]]
|