in reply to strict isn't everything
Here's one I am not sure about:
I would, at a wild guess, think that if uploading resumés, and with the same name, they would, if anything, replace the old one - or be disallowed. This appends to an earlier file, which just seems wrong. I can guess the file will be deleted when this script is done, but this allows for strange effects. Using a unique temporary name would have been better, if the file should not stay there, or to check for duplicates if it should stay. File locking could be yet another way to go.open(OUTPUT,">>$outputFile");
This, I wonder if it may have other implications elsewhere?
I'm not really sure how this works with CGI.pm and all, or how the rest of the code/system looks, but maybe a "local" would have helped?$CGI::DISABLE_UPLOADS = 0; # Temporarily reenable up
I don't get this one either:
If there are errors, you automatically have too big file size? That ought to confuse a few... :)if ( $stats[7] > MAX_FILE_SIZE || %errors ) { $errors{'file_size'} = ["","","Your submitted file's size is over 3M +B."];
This is an odd check:
There must be more non-allowed file types, or did he mean "!~"?if( $file_type =~ /octet-stream/ ) { $errors{ 'file_type' } = ["","","Unrecognize your submitted resume f +ile format."]; goto Print; }
I'm sure I missed all the real errors, and pointed out perfectly legitimate stuff, but if that is so, I hope to learn something from the grind-my-face-in-the-ground treatment I am gonna get. :)
|
---|