Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > CGI and temFileName -- uploading files

Thread Tools

CGI and temFileName -- uploading files

Posts: n/a
I have an internal app working on Windows with Apache that munges data
files and generates reports. It runs inside our firewall, and only
four people have access. We had a number of these kinds of apps to do
and limited time, so I took the easy way out (always dangerous, hence
this post) and used the CGI method tmpFileName() to grab the upload
file(s), open them, and write the data to memory. The upload files are
deleted when the script exits, which is fine as we don't need to save
them on the server.

The apps don't have any security at all other than restriction to four
users internal to our local network, and they are in the offices down
the hall so they are certainly within shouting distance if not
grabbing distance. I am aware that Bad Things can happen with file
uploads but am not concerned in general because we are not attached to
the outside world (no external access to the network).

Here's the question: is there anything extremely dangerous in doing
things this way, in view of the fact that we control the server, the
data, the users, and the interface?

When I say 'this way' what I mean is that our data file(s) are
uploaded via an HTML file form upload widget, I capture the OS name
with tmpFileName, use that as a file handle to open and read the
contents of the file, close the file, and write the reports to the
local file system BEFORE THE CGI SCRIPT EXITS! I don't want to save a
local copy of the input files on the server, and it was easier to do
it this way rather than writing to a local file, then munging the
local file before deleting it.

Thanks, CC.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading 2 files with 1 CGI buffer William Perl Misc 10 01-10-2006 07:56 PM cgi uploading files Perl Misc 4 11-08-2005 09:42 PM
maybe OT: uploading files w/ cgi darius Perl Misc 2 07-21-2004 06:30 PM
Uploading files with cgi - binary-files are truncated !? dermoon Python 0 10-08-2003 10:21 PM
Uploading files using D Borland Perl Misc 4 09-29-2003 10:26 AM