in reply to Easy Pixel PNG Generator
open IMAGE, ">" . $name . ".png"; binmode IMAGE; print IMAGE $im->png(); close IMAGE;
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Easy Pixel PNG Generator
by bladx (Chaplain) on Oct 11, 2001 at 18:25 UTC |