Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Easy Pixel PNG Generatorby ajt (Prior) |
on Oct 11, 2001 at 15:44 UTC ( [id://118194]=note: print w/replies, xml ) | Need Help?? |
Err, this doesn't actually work! For those of us forced to labour under a Microsoft cloud, you can't just print binary files out without turning binmode on. Thus you need to change the print statement at the end to:
You have also loaded CGI but then gone on to print out your own HTML. It seems a bit much having a dog, and barking yourself, if you ask me. Also sin of sins, you are writing to the file system, with a user supplied filename and not doing any taint checking. I know you said this was a "simple utility", but you should not allow anyone to write to your filesystem, without being sure that they are writing what and where you want to allow them. See perlsec. I think merlyn wrote a pixel factory on his column, which is similar in idea. Your script is however, minor defects aside, quite useful.
In Section
Code Catacombs
|
|