Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Howdy,
I recently figured I should try to see how secure my CGI stuff was, and... well, it isn't. I usually taint, but not very well. I don't shell user input, but I don't check input if it is only for DB insertion.
I'm trying to learn how/what to fix in all this. I came across one problem I don't know how to solve. If I use a CGI upload, I get a file-handle passed back to me. How do I verify that this file-handle is valid and represents a text-file? Further, what's to stop somebody from passing me an enormous file that crashes my server?
There must be obvious answers to this problem, but I'm wading through super-search results on CGI security and haven't come across it yet....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI File Upload Security
by tcf22 (Priest) on Sep 15, 2003 at 18:50 UTC | |
|
Re: CGI File Upload Security
by sulfericacid (Deacon) on Sep 15, 2003 at 19:48 UTC | |
|
Re: CGI File Upload Security
by tomhukins (Curate) on Sep 15, 2003 at 19:30 UTC | |
|
Re: CGI File Upload Security
by tachyon (Chancellor) on Sep 16, 2003 at 06:33 UTC | |
|
Re: CGI File Upload Security
by jonadab (Parson) on Sep 16, 2003 at 04:07 UTC | |
|
Re: CGI File Upload Security (with Data::FormValidator)
by markjugg (Curate) on Sep 17, 2003 at 02:09 UTC |