JeremyH
03-27-2006, 11:46 PM
Hello, I'm learning Perl and wanted to know what precautions I should take for a guestbook-like addition to my webpage.
I want to use a form with a name field and a textarea for user comments. Using a Perl script I wrote, that information will go into a different html file. From there I will use a SSI on my homepage to put the form content, converted into html, into its own column.
In reading up on this, I find out the form can be tricked into running malicious programs on my server unless I take some precautions. O'Rielly's "CGI Programming" says I need to write some code to strip out some characters from the user input (; <>&*`|) to make it safe.
I can do that, but I want to know if there is anything else I should consider before trying this? Or is this not as dangerous as the book implies?
I want to use a form with a name field and a textarea for user comments. Using a Perl script I wrote, that information will go into a different html file. From there I will use a SSI on my homepage to put the form content, converted into html, into its own column.
In reading up on this, I find out the form can be tricked into running malicious programs on my server unless I take some precautions. O'Rielly's "CGI Programming" says I need to write some code to strip out some characters from the user input (; <>&*`|) to make it safe.
I can do that, but I want to know if there is anything else I should consider before trying this? Or is this not as dangerous as the book implies?